problem in Balloon True type support

Waldemar Dick sourceforge at devmue.de
Tue Aug 9 11:33:33 UTC 2005


Hi,

Prabhakar katlakunta wrote:

>To be more specific. Lets say there is  an glyph at location 123. 
>And i am able to view whole glyphs using 
>                  
>                        TTFontReader openTTFFile:'xyz.ttf'.
>
>But when i am trying to view the individual glyphs by giving the
>ascii. i am unable to view the glyph properly, an blank box is
>appearing instead of glyph at that particular location. This problem
>is not with all the glyphs .The code used to view the individual
>glyphs is:
>
[snip]

I have no idea how Squeak handles TrueType fonts, but generally there is 
a true type table
embedded in each font named "cmap" which maps characters to glyph indexes.
If you are lucky ASCII characters can be used as indexes to glyphs, but 
if you
have a symbol font or a font for a unicode subset, then the mapping 
won't work.
"Symbol font" is an encoding type, not a glyph type, so a font 
containing just a
few characters will be encoded as symbol font (most of the times).
Missing characters are mapped by default to index 0, which is the
".notdef" character.
A symbol font glyph index will start (again most of the times) at index 
0xF000 and
not at 0x0000.

So, take a look at your font first. Does it contain all characters? Is 
it a symbol font?
Is it a unicode font? Which platform and language is it encoded to 
(there different encodings
for plattform and language). ...

Here is a link to the OpenType font file (a bit microsoft specific, but 
a good starting point):
http://www.microsoft.com/typography/otspec/

I know I couldn't help you, but a bit of background can sometimes help 
to find the problem.

Greetings,
Waldemar Dick




More information about the Squeak-dev mailing list