patcat has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use the unicode open-type font "STIXGeneral.otf" with Perl-Tk, for I am making a math word processor. In order to test this font, I have written a small Perl-Tk script (see below) and a small HTML file
(displaying the same characters), in order to test this font.
The results are the following : -- the Perl-Tk script works very well with Windows Vista, but very bad with Linux Ubuntu (the font is not recognized by Perl-Tk, although the browser recognizes it) ; -- the HTML file works very well with both Windows Vista and Linux Ubuntu. If I replace open-type by true-type, the things are not better. What do you think about ?use utf8;use Tk; $f="STIXGeneral";$c="\n"; $s="\x{2014}"x2;$s=$c.$s."o".$s.$c;$p=" (Perl-Tk)"; $s=$f.$p.$s."A B C D \x{300}x \x{302}x \x{303}x ". "\x{304}x".$c."\x{210C} \x{210E} \x{2112} \x{2115} ". "\x{2202} \x{2207} \x{2211} \x{221A}".$s; $m=MainWindow->new(-title=>'STIXtest (P. Assouad)'); $m->geometry('400x400+40+40'); $t=$m->Scrolled('Text')->pack(); $t->configure(-font=>"{".$f."} 18 {normal}"); $t->insert('1.0',$s); MainLoop();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: open-type fonts for Perl-Tk with Linux
by lamprecht (Friar) on Jun 21, 2010 at 15:43 UTC | |
Re: open-type fonts for Perl-Tk with Linux
by Tux (Canon) on Jun 22, 2010 at 08:28 UTC | |
by lamprecht (Friar) on Jun 22, 2010 at 12:00 UTC | |
by Tux (Canon) on Jun 22, 2010 at 13:57 UTC |
Back to
Seekers of Perl Wisdom