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

Karl Ramberg (JIRA) tracker at squeakland.org
Wed May 18 11:39:34 EDT 2011


     [ http://tracker.squeakland.org/browse/SQ-880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Ramberg resolved SQ-880.
-----------------------------

    Fix Version/s: etoys 2011
       Resolution: Complete

> 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
>             Fix For: etoys 2011
>
>         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