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

Re: [g-i] fonts: a few thoughts

Kenshi Muto wrote:
At 4 Dec 05 02:46:52 GMT,
Kenshi Muto wrote:



While reporting this on debian-boot, Kenshi Muto told me about a
tool [4] he's developing along with Hideaki Iwai which goal is the same; I took a look and apparently granularity is even more accurate:
it selects the needed chars by exploring po files.

Finally we (Sorry, I mistook my friend name, 'Hidetaka') created
ttf-compact-fonts package. This source package produces

I didn't unify each fonts to one TTF, because each font shapes are
completely various and CJK has character mapping confliction.

Well, when I integrated this font to gtk-miniiso, I found Japanese
characters are taken from three font files - FreeSansSerif, uming
(Chinese), and Sazanami (Japanese). It provides a strange face.

To solve this, I think it's better to provide /.gtkrc-2.0 according to
chosen language.
After writing this file, screen refresh is needed.

Here is a sample source, is copied&pasted from gtk-theme-switch.
Unfortunately when I tried this, d-i frontend always restarted by unknown
reason... (although font change is succeeded.)

/* gcc -o langupdate `pkg-config gtk+-directfb-2.0 --cflags` `pkg-config gtk+-directfb-2.0 --libs` langupdate.c */
/* Before running this program, write variables to ~/.gtkrc-2.0.
   For example:
     gtk-font-name = "Sazanami Gothic 10"

#include <gtk/gtk.h>

int main(int argc, char *argv[]) {
  gtk_init(&argc, &argv);
  return 0;

/* Taken from gtk-theme-switch: switch2.c */
        GdkEventClient event;
        event.type = GDK_CLIENT_EVENT;
        event.send_event = TRUE;
        event.window = NULL;
        event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
        event.data_format = 8;
        gdk_event_send_clientmessage_toall((GdkEvent *)&event);

uhm.. i have to admit i never explicitly parsed a gtk runtime configuration file, but maybe it's better letting libfontconfig doing the most appropriate glyps selection. Letting libfontconfig handling glyphs selection won't require us to hardcore font-selection related code into gtk.c and also will bring benefits to other GTK apps that may be included into the g-i like gparted that xavier oswald is working on to integrate into the g-i. AFAIK some initial work has been already done to develope the tools needed to automatically remove from free-sans glyphs already provided by other "specialized" fonts. I don't know if work has been done/planned to remove overlapping glyphs from n-uples of specialized fonts (ex: the Japanese glyphs that are provided by FreeSansSerif, uming(Chinese), and Sazanami (Japanese) ).
To test the new ttf-compact-fonts-udeb into the miniiso i've

-removed x-fonts-whq.tgz from the tarballs directory (this is the tarball your udeb should replace, right?)
-commented out ttf-freefont-udeb from "common" configuration file
-added ttf-compact-fonts-udeb into "common" configuration

and this is what i got (i guess latin fonts look ugly because of removal of freefont-sans)


do they look correct to you?

thanks for your apreciated work!


Reply to: