[squeak-dev] The Inbox: TrueType-kfr.52.mcz

karl ramberg karlramberg at gmail.com
Fri Jan 4 05:57:07 UTC 2019


Hi,
This code is probably wrong.
I posted this fix to inbox because I was unsure how all these nested blocks
worked.

It kind of works now, because the FontImporterTool opens.

Best,
Karl



On Thu, Jan 3, 2019 at 10:58 PM Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
>
> Le jeu. 3 janv. 2019 à 22:34, <commits at source.squeak.org> a écrit :
>
>> A new version of TrueType was added to project The Inbox:
>> http://source.squeak.org/inbox/TrueType-kfr.52.mcz
>>
>> ==================== Summary ====================
>>
>> Name: TrueType-kfr.52
>> Author: kfr
>> Time: 3 January 2019, 10:34:19.705286 pm
>> UUID: 248937ad-7e63-4c27-b659-6165fdda9ffe
>> Ancestors: TrueType-pre.51
>>
>> FontImporterTool would not open because 'Noto Color Emoji' error:  'File
>> does not have a naming table'.
>> Delete the font from FontPaths and continue
>>
>> =============== Diff against TrueType-pre.51 ===============
>>
>> Item was changed:
>>   ----- Method: TTFileDescription class>>openFontFile:do: (in category
>> 'instance creation') -----
>>   openFontFile: fontFileName do: aBlock
>>         "Open the font with the given font file name"
>>         | fontFilePath file |
>>         fontFilePath := FontPaths at: fontFileName
>>                 ifAbsentPut:[self findFontFile: fontFileName].
>>         fontFilePath ifNil:[^nil].
>>         file := [FileStream readOnlyFileNamed: fontFilePath] on: Error
>> do:[:ex|
>>                 "We lost the font; someone might have moved it away"
>> +               FontPaths removeKey: fontFileName ifAbsent:[].
>> +               ^nil].
>> +       [^[aBlock value: file binary]  on: Error do:[:ex|
>> +               "Error reading font. Skip it"
>> +               FontPaths removeKey: fontFileName ifAbsent:[].
>> +               ^nil] ] ensure:[file close].
>>
> does a ^ works well inside exception handling?
> I think that just nil would do the work...
>
>> +       !
>> -               fontFilePath removeKey: fontFileName ifAbsent:[].
>> -               ^nil
>> -       ].
>> -       ^[aBlock value: file binary] ensure:[file close].!
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190104/4bf98a7e/attachment.html>


More information about the Squeak-dev mailing list