[etoys-notify] [JIRA] Commented: (SQ-880) Possible infinite loop in FixedFaceFont

Karl Ramberg (JIRA) tracker at squeakland.org
Mon May 16 17:55:31 EDT 2011

    [ http://tracker.squeakland.org/browse/SQ-880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39784#action_39784 ] 

Karl Ramberg commented on SQ-880:

Added changeSet to http://source.squeak.org/etoys/Multilingual-kfr.17.mcz

> Possible infinite loop in FixedFaceFont
> ---------------------------------------
>                 Key: SQ-880
>                 URL: http://tracker.squeakland.org/browse/SQ-880
>             Project: squeakland
>          Issue Type: Bug
>          Components: etoys
>            Reporter: Xin Wang
>         Attachments: FixedFaceFont-possible-infinite-loop-bugfix.xinwang.1.cs
> How to reproduce:
> 1. Using following code to set Arial as fallback font of BistreamVeraSans.
> TTCFont newTextStyleFromTTFile: 'C:\Windows\Fonts\arial.ttf'.
> (TTCFont allInstances select: [ :a | a familyName = 'BitstreamVeraSans' ]) do: [:i | i setupDefaultFallbackFontTo: (TextStyle named: 'Arial')].
> 2. Open "choose language " menu, then Etoys will get stuck.
> It is caused by a circular reference of fallbackFont. In circumstance of previous example, Arial is fallbackFont of BitstreamVeraSans, and a FixedFaceFont instance with BitstreamVeraSans as baseFont is fallbackFont of Arial. When TTCFont>>ascent is called, it also asks fallbackFont's ascent, then Etoys get into an infinite loop.
> Attached changeset change FixedFaceFont>>fontSize: to do a shallowCopy of baseFont, and then set its fallbackFont to be nil, so that TTCFont>>ascent call can be returned.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tracker.squeakland.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the etoys-notify mailing list