File: xlfont.dia.ref

package info (click to toggle)
scilab 6.1.0%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 373,664 kB
  • sloc: xml: 800,046; cpp: 278,515; ansic: 223,487; java: 191,492; fortran: 91,481; ml: 23,103; tcl: 16,853; sh: 10,897; makefile: 9,608; lex: 1,611; perl: 1,566; yacc: 1,264; php: 690; cs: 614; javascript: 50
file content (45 lines) | stat: -rw-r--r-- 1,510 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - INRIA - Allan CORNET
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- TEST WITH GRAPHIC -->
xlfont('reset')
initialfonts = xlfont();
if size(initialfonts,'*') <> 11 then bugmes();quit;end
availablefonts = xlfont('AVAILABLE_FONTS');
if size(availablefonts,'*') < 11 then bugmes();quit;end
for i=1:11:1
  xlfont(availablefonts(i),i);
end
for i=1:11:1
  xlfont(availablefonts(i),i,%t,%f);
end
for i=1:11:1
  xlfont(availablefonts(i),i,%t);
end
xlfont('reset');
afterresetfonts = xlfont();
if ~and(initialfonts == afterresetfonts) then bugmes();quit;end
cd(TMPDIR);
exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
tab_ref = [
"世界您好",
"азеазея",
"ハロー・ワールド",
"حريات وحقوق",
"תוכנית"];
fontpath = SCI + "/modules/graphics/tests/unit_tests";
fontname = "DejaVuSansMono.ttf";
fontfull = "/usr/share/fonts/truetype/dejavu/" + fontname;
for i = 1 : size(tab_ref,'*')
  pathtemp = TMPDIR + filesep() + 'dir_' + tab_ref(i);
  fonttemp = pathtemp + filesep() + fontname;
  copyfile(fontfull, fonttemp);
  ierr = execstr('r = xlfont(fonttemp);','errcatch');
  if ierr <> 0 then bugmes();quit;end
  if ~isdef('r') then bugmes();quit;end
  clear r;
end
xlfont('reset')