Fonts (was Re: [etoys-dev] Wording in Clouds)

Bert Freudenberg bert at freudenbergs.de
Fri Jul 31 12:30:19 EDT 2009


On 31.07.2009, at 08:31, Andreas Raab wrote:

> Hi -
>
> I've integrated Bert's fix as well as support for .ttc collections:
>
>  http://tracker.squeakland.org/browse/SQ-283
>
> While working on this I realized how outdated the etoys image is  
> when it comes to TTF support. I was trying to bring in some other  
> necessary fixes but that wouldn't work at all, so I've added a filed  
> out version of TTCFont.st from 3.10.2-trunk which has all the  
> necessary fixes but probably some other issues. With this version  
> things *almost* work:
>
> * Install TTFileDescription.5.cs
> * Install TTCFont.st
> * Install WhiteSpaceFixes.2.cs


I tried on a Mac, first failure in #fontOffsetsInFile:. There are  
fonts that are tagged 'true' instead of (0 1 0 0):

http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html

"The values 'true' (0x74727565) and 0x00010000 are recognized by the  
Mac OS as referring to TrueType fonts."

That's easy to fix.

Then there are bitmap fonts like "NISC18030.ttf" which cannot be  
loaded, they fail when looking for the 'head' table.

The list of *ttf on the Mac isn't really long, most fonts are not in  
truetype format apparently:

('Al Bayan' 'Andale Mono' 'AppleMyungjo' 'Arial' 'Arial Black' 'Arial  
Hebrew' 'Arial Narrow' 'Arial Rounded MT Bold' 'Arial Unicode MS'  
'Ayuthaya' 'Baghdad' 'Brush Script MT' 'Chalkboard' 'Comic Sans MS'  
'Corsiva Hebrew' 'Courier New' 'DecoType Naskh' 'Devanagari MT'  
'Euphemia UCAS' 'Georgia' 'Gujarati MT' 'Gurmukhi MT' 'Impact'  
'InaiMathi' 'Kailasa' 'Kokonor' 'Krungthep' 'KufiStandardGK'  
'Microsoft Sans Serif' 'Mshtakan' 'Nadeem' 'New Peninim MT'  
'Plantagenet Cherokee' 'Sathu' 'Silom' 'Tahoma' 'Times New Roman'  
'Trebuchet MS' 'Verdana' 'Webdings' 'Wingdings' 'Wingdings 2'  
'Wingdings 3')

There were 5 more fonts but their names were mangled (IIRC fonts can  
store their meta data in various languages and encodings).

I tried to install "Tahoma" but got the message that the subfamily  
"Negreta" (span. "black") is not recognized in #indexOfSubfamilyName:.  
After fixing that it worked fine.

Attaching a changeset with my fixes (though maybe the bitmap detection  
should not just rely on errors).

If anyone else is testing on a Mac you might find this helpful (and if  
you do, review and push, thanks):

http://tracker.squeakland.org/browse/SQ-243

- Bert -
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : ttfMac-bf.1.cs
Dateityp    : application/octet-stream
Dateigröße  : 2558 bytes
Beschreibung: nicht verfügbar
URL         : http://luna.immuexa.com/pipermail/etoys-dev/attachments/20090731/2aed07eb/ttfMac-bf.1.obj


More information about the etoys-dev mailing list