Re: Tk Unicode is slow
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Tk Unicode is slow

From: Jeff Hobbs <jeffh@activestate.com>
Date: Thu Sep 29 2005 - 17:33:04 CEST

Keith Nash wrote:
>>As Donal noted, the delay is due to Tk doing a font lookup to
>>find a suitable font for characters that are not recognized in
>>the current font you have chosen to display. Use one with all
>>the chars, and everything is fast. I have considered adding
>>extra Tcl-level control over this fallback behavior, but it is
>>hard to design a clean API to control this.
>
>
> (...the feature requests keep rolling in...)
>
> At the minimum, it would be useful if Tcl could be told to use the specified
> font *only*, i.e. not to search every font on the system whenever it
> encounters a missing glyph.
>
> Ideally, one would be able to create a virtual font that borrows different
> glyphs from different real fonts. It sounds as if this is what Tcl's font
> lookup actually does - but it doesn't cache the virtual font metadata, and
> it doesn't tell us what it is.

At a minimum, this might not be to hard, if it is layered on
top of named fonts. In fact, I think any control of font
fallback would be layered on top of named fonts. Something
like
        font create myfont -family Courier -size 10 -fallback 0

-- 
   Jeff Hobbs, The Tcl Guy
   http://www.ActiveState.com/, a division of Sophos
Received on Sat Oct 15 03:53:37 2005