Re: How do I know if a character can be displayed at all on the current screen?
From: Cameron Laird (claird_at_lairds.us)
Date: 09/13/04
- Next message: Cameron Laird: "Re: beginner question... (about if)"
- Previous message: lvirden_at_gmail.com: "Zip file/Zip Executable vs StarKit/StarPacks [Was: Re: Tcl application deployment"
- In reply to: Victor Wagner: "Re: How do I know if a character can be displayed at all on the current screen?"
- Next in thread: Jeff Hobbs: "Re: How do I know if a character can be displayed at all on the current screen?"
- Reply: Jeff Hobbs: "Re: How do I know if a character can be displayed at all on the current screen?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Sep 2004 16:08:10 GMT
In article <ci433c$of0$3@wagner.wagner.home>,
Victor Wagner <vitus@45.free.net> wrote:
>Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> wrote:
>: Hi Eric,
>: Eric Brunel <eric_brunel@despammed.com> writes:
>: > If I run it on Linux or Windows with a Japanese font package
>: > installed, the Japanese character is correctly displayed; on Windows
>: > with no Japanese font package installed, it is displayed as a black
>: > rectangle.
>: >
>: > The question is: how can I know whether I'm in the first or the
>: > second case? I looked the man page for the font command in 8.3, 8.4
>: > and 8.5, but nothing seems available. Searching the newsgroup
>: > archive only returned unanswered questions... Ideas anyone?
>: You can't do that in Tk currently. Tk simply requires that the
>: necessary fonts are installed on the system.
>: If the current font doesn't have a character, Tk will search all
>: installed fonts for a match, so you usually do not need to know if
>: current font specifically has a specific character. This
>: font-fallback is an internal mechanism though, and implemented using
>: system-specific means. It doesn't export any script-visible
>: interfaces.
>
>Problem is that this fallback mechanism typically picks ugliest font on
>my system.
>
>For instance, for all standard font families I have collection of fonts
>with identical glyphs for all possible cyrillic encodings. But if I
>specify something like Helvetica it picks up something with very
>different glyphs for Cyrillic and ASCII.
>
>If I specify XLFD name for font which I know contains all neccessary
>glyphs, I see the same problem, regardless of font encoding I specify in
>XLFD (I can choose koi8-r, microsoft-cp1251, iso8859-5 and iso10646-1 -
>all fonts are present and compiled from same bdf file).
>
>Only reliable way I found to get nice looking text in tk yet - use
>Microsoft TTF fonts exclusively. But using true type is not always
>desirable. Hand-tuned bitmapped fonts looks much better in small sizes.
>--
Font programming frustrates me, and I'm reasonably confident
that Tk can't solve all the problems on its own. I strongly
suspect, though, that, if we applied ourselves to it for a
few hours of intense co-operation, we could come up with a
TIP to extend 145 and 213 to provide more introspection.
Some means to compute, "given this character in this context,
Tk will render based on this glyph", would, I think, solve a
lot of the most pressing problems.
Also, Richard Suchenwirth probably has clever ways to make
things come out nicely with the existing Tk, but I'm not yet
font-savvy enough to understand them.
- Next message: Cameron Laird: "Re: beginner question... (about if)"
- Previous message: lvirden_at_gmail.com: "Zip file/Zip Executable vs StarKit/StarPacks [Was: Re: Tcl application deployment"
- In reply to: Victor Wagner: "Re: How do I know if a character can be displayed at all on the current screen?"
- Next in thread: Jeff Hobbs: "Re: How do I know if a character can be displayed at all on the current screen?"
- Reply: Jeff Hobbs: "Re: How do I know if a character can be displayed at all on the current screen?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|