<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font size="-1">Hi,<br>
<br>
I need some help because my knowledge about fonts and fonts
encoding is very short.<br>
<br>
I try to switch from custom bitmap painting to direct Cairo text
rendering in GraceGTK
(<a class="moz-txt-link-freetext" href="https://sourceforge.net/projects/gracegtk/">https://sourceforge.net/projects/gracegtk/</a>), a fork of Grace
(<a class="moz-txt-link-freetext" href="http://plasma-gate.weizmann.ac.il/Grace/">http://plasma-gate.weizmann.ac.il/Grace/</a>)<br>
<br>
This implies to switch from T1lib to FreeType2 and the goal is to
use the same mapping as with T1lib.<br>
<br>
Note that fonts files in .pfb format are included into the package
distributed with Grace and I wish to always use them.<br>
<br>
For most of the included fonts, it is working well but not for
all.<br>
<br>
For the Symbol font, characters are not displayed as needed, e.g.
Greek letter "alpha" is not painted when ASCII "a" is used.<br>
<br>
I was thinking that the alternate charmap should do that, but it
seems that this is not the case.<br>
<br>
The following scheme is used:<br>
<br>
FT_Face ft_face;<br>
error = FT_New_Face (library ,"s050000l.pfb" ,0 ,&ft_face);<br>
...<br>
FT_Select_Charmap (ft_face ,FT_ENCODING_ADOBE_CUSTOM);<br>
...<br>
cairo_font_face_t *cr_face;<br>
cr_face = cairo_ft_font_face_create_for_ft_face (*ft_face
,CAIRO_HINT_METRICS_DEFAULT);<br>
cairo_set_font_face (cr ,cr_face);<br>
...<br>
cairo_show_text (cr ,"the_string");<br>
<br>
Do you think that I miss something?<br>
<br>
Font file s050000l.pfb may be found at GraceGTK Web site<br>
<br>
Note that I can't use Pango because Grace and GraceGTK have their
own escape sequences to display greek letters, underscripts,
overscripts,... and I wish to maintain upward compatibility with
old scripts.<br>
<br>
Could you give me some hints to achieve this goal?<br>
<br>
<br>
Cheers</font>
</body>
</html>