<div dir="ltr">Hi,<div>Here I think it would be clearer to remove the out commented &quot;]&quot; !</div><div><br></div><div>Karl</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 2:57 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tobias Pape uploaded a new version of TrueType to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/TrueType-topa.40.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/TrueType-topa.40.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: TrueType-topa.40<br>
Author: topa<br>
Time: 1 September 2015, 2:57:19.158 pm<br>
UUID: 9abe9053-6bf7-4a8a-b769-caf1d6bbbc97<br>
Ancestors: TrueType-topa.39<br>
<br>
Use all glyphs in a Font, not just 256 (fix by Vasya Chajko)<br>
<br>
=============== Diff against TrueType-topa.39 ===============<br>
<br>
Item was changed:<br>
  ----- Method: TTCFontReader&gt;&gt;processCharMap: (in category &#39;as yet unclassified&#39;) -----<br>
  processCharMap: assoc<br>
        &quot;Process the given character map&quot;<br>
<br>
        | glyph cmap encode0 encode1 char value null |<br>
        cmap := assoc value.<br>
        null := (glyphs at: (cmap at: Character space asUnicode + 1) + 1) copy.<br>
        null contours: #().<br>
<br>
        encode0 := Array new: 256 withAll: glyphs first.<br>
        encode1 := Array new: 65536 withAll: glyphs first.<br>
<br>
        0 to: 255 do: [:i |<br>
                char := Character value: i.<br>
                glyph := glyphs at: (cmap at: char asUnicode + 1) + 1.<br>
                encode0 at: i+1 put: glyph.<br>
        ].<br>
        Character separators do: [:c |<br>
                encode0 at: (c asciiValue + 1) put: null.<br>
        ].<br>
        0 to: 65536 - 1 do: [:i |<br>
                value := cmap at: i+1.<br>
                value = 65535 ifFalse: [ &quot;???&quot;<br>
                        | g |<br>
+                       g := glyphs at: value+1 ifAbsent: [ null. ].<br>
-                       g := glyphs at: value+1.<br>
                        (g isKindOf: TTCompositeGlyph) ifFalse: [<br>
                                encode1 at: i+1 put: g.<br>
                        ] ifTrue: [<br>
                                g basicGlyphs: (((glyphs at: value+1) basicGlyphs) collect: [:t | t key-&gt;(glyphs at: (t value glyphIndex+1))]).<br>
                                encode1 at: i+1 put: g<br>
                        ].<br>
                ]<br>
        ].<br>
<br>
        ^ {encode0. encode1}.<br>
  !<br>
<br>
Item was changed:<br>
  ----- Method: TTFontReader&gt;&gt;decodeCmapFmtTable: (in category &#39;private&#39;) -----<br>
  decodeCmapFmtTable: entry<br>
        | cmapFmt length entryCount segCount segments offset cmap firstCode |<br>
        cmapFmt := entry nextUShort.<br>
        length := entry nextUShort.<br>
        entry skip: 2. &quot;skip version&quot;<br>
<br>
        cmapFmt = 0 ifTrue: &quot;byte encoded table&quot;<br>
                [length := length - 6.          &quot;should be always 256&quot;<br>
                length &lt;= 0 ifTrue: [^ nil].    &quot;but sometimes, this table is empty&quot;<br>
                cmap := Array new: length.<br>
                entry nextBytes: length into: cmap startingAt: entry offset.<br>
                ^ cmap].<br>
<br>
        cmapFmt = 4 ifTrue: &quot;segment mapping to deltavalues&quot;<br>
                [segCount := entry nextUShort // 2.<br>
                entry skip: 6. &quot;skip searchRange, entrySelector, rangeShift&quot;<br>
                segments := Array new: segCount.<br>
                segments := (1 to: segCount) collect: [:e | Array new: 4].<br>
                1 to: segCount do: [:i | (segments at: i) at: 2 put: entry nextUShort]. &quot;endCount&quot;<br>
                entry skip: 2. &quot;skip reservedPad&quot;<br>
                1 to: segCount do: [:i | (segments at: i) at: 1 put: entry nextUShort]. &quot;startCount&quot;<br>
                1 to: segCount do: [:i | (segments at: i) at: 3 put: entry nextShort]. &quot;idDelta&quot;<br>
                offset := entry offset.<br>
                1 to: segCount do: [:i | (segments at: i) at: 4 put: entry nextUShort]. &quot;idRangeOffset&quot;<br>
                entryCount := segments inject: 0 into: [:max :seg | max max: seg second].<br>
                cmap := Array new: entryCount+1 withAll: 0..<br>
                segments withIndexDo:<br>
                        [:seg :si | | code |<br>
                        seg first to: seg second do:<br>
                                [:i |<br>
+                                       seg last &gt; 0 ifTrue:<br>
-                               i &lt; 256 ifTrue:<br>
-                                       [seg last &gt; 0 ifTrue:<br>
                                                [&quot;offset to glypthIdArray - this is really C-magic!!&quot;<br>
                                                entry offset: i - seg first - 1 * 2 + seg last + si + si + offset.<br>
                                                code := entry nextUShort.<br>
                                                code &gt; 0 ifTrue: [code := code + seg third]]<br>
                                        ifFalse:<br>
                                                [&quot;simple offset&quot;<br>
                                                code := i + seg third].<br>
+                                       cmap at: i + 1 put: code&quot;]&quot;]].<br>
-                                       cmap at: i + 1 put: code]]].<br>
                ^ cmap].<br>
<br>
        cmapFmt = 6 ifTrue: &quot;trimmed table&quot;<br>
                [firstCode := entry nextUShort.<br>
                entryCount := entry nextUShort.<br>
                cmap := Array new: entryCount + firstCode withAll: 0.<br>
                entryCount timesRepeat:<br>
                        [cmap at: (firstCode := firstCode + 1) put: entry nextUShort].<br>
                ^ cmap].<br>
        ^ nil!<br>
<br>
<br>
</blockquote></div><br></div>