Re: [Gnome-print] PATCH: support freetype



Hello Akira!

On Wed, 2001-08-22 at 17:03, Akira TAGOH wrote:
> Well, I have made these patches on gnome-1-4-branch and
> tested it. Ok, I will apply to HEAD and test it.

You probably cannot. HEAD font handling is too much changed,
but as it uses FreeType2 directly, supporting CJK there should be
quite trivial.
HEAD is changing still, so I am not sure, whether it will be released
at all, or will the changes there appear in gnome2.

> LK> Also, I do not like the idea of specific init/finish for
> LK> gnome-print at all. After all, we cannot guarantee finish to be
> LK> called anyways, as programs may crash etc.
> LK> So I suggest moving freetype_init to face class initialization,
> LK> and either:
> LK> a) dropping finish at all
> LK> b) moving finish to face_destroy, so if all faces are destroyed,
> LK>    we clean up everything. Alternatively there can be some
> LK>    timeout, so it really behaves like cache.
> 
> I hope a suggestion of b. I just tested it and it's working
> well. Thanks!
> 
> BTW these patches is NOT perfects for i18n. Right now
> gnome-print has a default font which is
> hardcoded(e.g. Helvetica) these patches is working well by
> the applications which intentionally can specify the fonts
> by users, but the applications which doesn't support it may
> be not able to display multibyte strings correctly. so  I
> propose that the fontmap has a language specific default
> font. we can solve it by using a every languages default
> font which got from fontmap instead of a hardcode font.
> 
> for example:
> <font format="truetype" name="Kochi Gothic" version="0.0"
> familyname="Kochi Gothic" speciesname="Normal"
> psname="Kochi-Gothic" weight="Regular" italicangle="0"
> lang="ja">

Hmmm, that seems like a good idea to me ;-)
Also, maybe add default="true", so users can explicitly select,
which fonts will be used as default, for some language.
Still, there are problems:
a) We need addition to API for language selection, something like:

   gnome_font_face_find_closest (familyname, style, language)

And language will get absolute preference over other attributes.
If NULL, locale language will be used, and ordinary fetching
methods default to using current locale.
Still, that is not so easy :(
For CJK AFAIK single font is actually for single language. For
europaean this is not true. It seems silly to list all latin
languages in font description (I even do not have idea, how
many there are). One cold do latin1 default, but even then, there
remain other latin charsets etc.

> Also, I'm not working about pdf. so the pdf writer may be
> not able to use the fonts which can handle with freetype.
> needs some works, but will be not difficult.

Current PDF driver does not support 16bit encoding at all. I have
to poke Chema, to find out, how much work is needed for that.

OK. I'll start merging your code locally now. I think I'll do
short-term CVS branch, as I'd like you could work on it directly,
but the changes are bit too big for working in stable branch.
If everything is OK, we can do 0.30 in weeks ;)

Best wishes,
Lauris Kaplinski






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