Tobias Pape uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-topa.42.mcz==================== Summary ====================
Name: TrueType-topa.42
Author: topa
Time: 1 June 2016, 12:11:05.54556 pm
UUID: d19fb495-4371-456b-8551-ab05a789f105
Ancestors: TrueType-topa.41
All fonts should know whether they have a glyph.
For the way TT fonts currently work, this information is tricky to get, tho.
=============== Diff against TrueType-topa.41 ===============
Item was added:
+ ----- Method: TTCFont>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+ "Answer whether this font includes a glyph for the given character"
+ ^ aCharacter charCode <= self maxAscii
+ and:[
+ aCharacter = Character null
+ ifTrue: [(self formOf: aCharacter) notNil]
+ ifFalse: [
+ "this should also be
+ (self formOf: aCharacter) notNil
+ but it does not work, the fallback glyph -- if present -- is always found instead.
+ So we fake. if aCharacter is the same form as Character null aka 0, we assume absence."
+ (self characterFormAt: aCharacter) bits ~= self fallbackForm bits]]!
Item was changed:
----- Method: TTCFont>>hasGlyphOf: (in category 'private') -----
hasGlyphOf: aCharacter
+ "Answer whether this font includes a glyph for the given character (or a fallback)"
+ self flag: #topa. "formOf: never actually returns nil for ttcfonts..."
- "Answer whether this font includes a glyph for the given character"
^ aCharacter charCode <= self maxAscii
and:[(self formOf: aCharacter) notNil]!
Item was added:
+ ----- Method: TTCFontSet>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+ "see TTCFont>>hasGlyphOf:"
+ ^ fontArray first basicHasGlyphOf: aCharacter!
Item was added:
+ ----- Method: TTCFontSet>>hasGlyphOf: (in category 'private') -----
+ hasGlyphOf: aCharacter
+ "see TTCFont>>hasGlyphOf:"
+ ^ fontArray first hasGlyphOf: aCharacter!