locales and fonts



on Jan 12 Pablo Saratxaga wrote:

> I note someone talked about fonts in addition to localization; that is so
> right !
> Currently if I launch a Gnome program whith LANG=es or LANG=ja or
> LANG=ru the same font is used (which is obviously wrong, and made unreadable
> the japanese and russian texts). A great improvement would be to have Gnome
> correctly pick the right font to display a text given its language; something
> like Netscape does for html pages using the charset=.... directive.

 That is not (just) a GNOME issue -- it is a Gtk+ issue.
Right now, besides setting env. vars:

LANG=ru_RU.KOI8-R; export LANG;
MM_CHARSET=KOI8-R; export MM_CHARSET

I have to keep following lines in my .gtkrc file:
===========================8<-------------------------------
style "default"
{
 font = "-*-fixed-*-*-semicondensed-*-*-*-*-*-*-*-koi8-r"
 # font = "-*-times-bold-r-normal-*-11-*-*-*-*-*-koi8-r"
}

style "GnomeScores_Logo_style"
{
  font = "-*-times-*-*-*-*-30-170-*-*-*-*-koi8-r"
  fg[NORMAL] = {0.0, 0.0, 1.0}
}

style "GnomeAbout_DrawingArea_style"
{
  bg[NORMAL] = {1.0, 1.0, 1.0}
}

style "GnomeAbout_Title_style"
{
  font = "-*-helvetica-bold-r-normal-*-20-*-*-*-*-*-koi8-r"
}

style "GnomeAbout_Copyright_style"
{
  font = "-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-koi8-r"
}

style "GnomeAbout_Author_style"
{
  font = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-koi8-r"
}

style "GnomeAbout_Names_style"
{
  font = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-koi8-r"
}

style "GnomeAbout_Comments_style"
{
  font = "-*-fixed-*-*-*-*-10-*-*-*-*-*-koi8-r"
}

style "GnomeGuru_PageTitle_style"
{
 font = "-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-koi8-r"
}
===========================8<-------------------------------

For some reason default font is being set only for themes other then
Default. The current arrangement is a pain -- there is no easy way of
switching from one locale to another.



> A more advanced feature would be a sort of "universal text widget", able
> to properly render any text in any language; that involves:
> 
> * receiving the text to display and the encoding used for that text as
>   parameters
> * choose the proper font (or fonts) for that encoding (eventually re-encode
>   from text encoding to font encoding; maybe the widget should use unicode
>   internally)
> * solve the right-to-left <-> left-to-right issues of hebrew, arabic, persian
>   (farsi), syriac, etc.
> * solve the composing and context dependent apparance of glyphs in case 
>   of arabic and syriac (a single letter can be rendered 4 different ways,
>   depending if it is on beginning, middle, end of word, or isolated),
>   thai, lao, khmer,... and other composing languages.

Would not be that addressed by the text widget with UNICODE support?

 Sergey



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]