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.
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();
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 ?

In reply to open-type fonts for Perl-Tk with Linux by patcat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.