bug-gnustep
[Top][All Lists]
Advanced

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

Re: Full unicode support for back-xlib (2)


From: Kazunobu Kuriyama
Subject: Re: Full unicode support for back-xlib (2)
Date: Sat, 19 Jul 2003 00:52:40 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.0.0) Gecko/20020614

Fred Kiefer wrote:

Fred Kiefer wrote:
 > <snip>
 > - As XGFontSetEnumerator is currently not implemented I would remove
 > all reverences to it.

(Reading references for reverences,)
At first, I declared XGFontSetEnumerator without implementation, and
then I got an exception telling me that enumerateFontsAndFamilies should
be overridden.  So I put the stub of it to make the module work.
This is the only reason I did it.  If the declaration is unnecessary and
is the cause of throwing the exception, your suggestion is helpful to make
the implementation better.


I meant to remove the whole class until there is real code for it.

Enclosed with #if 0 and #endif.

<snip>
It is even worse, the man page says:

BUGS
       Never use these functions. If you do, note that:
              These functions modify their first argument.
              These functions cannot be used on constant strings.
              The identity of the delimiting character is lost.
              The  strtok()  function  uses a static buffer while
              parsing, so it's not thread safe. Use strtok_r() if
              this matters to you.

I don't think that this could cause any harm in your case, still I would avoid it.

Taking all the points above into consideration, I did it. Hopefully, harmless.


Though the current code might look a bad programming style, I think
it is the right place to compromise.

I was also worried about the special treatment you do for missing add styles, as I can tell from the fonts installed on my machine almost any part of a XLFD may be missing, this should not cause any special treatment.

I simply need to distinguish the token '--' from the token '-'. It could be written in a more generalized way, but it would results in over-engineering. You can't use the return value of XGFontName() directly to load multiple fonts with XCreateFontSet() because XGFontName() is biased in favor of European fonts (see below). The code which looks special to you absorbs
this GNUstep's specialization.

As for the latter question: People can't expect every font on the earth
has the family property called 'Helvetica', 'Courier' or something
else which is taken for granted in Latin characters, while they can find
fonts with the foundry property such as 'Adobe' and 'fixed'..  The
current implementation reflects this reality.

(Because I thought this was a common knowledge, I didn't document
 it in detail.  This gives another example that people always think
 their own ways as 'the' standard, doesn't this?)


Are you saying that for Asian fonts there is no such thing as a font family? Or do they just have different names not Helvetica, which is what I would expect.

I didn't say Asian fonts have no font family. When I checked the state of the internal variables of GNUstep related to fonts, I found that it exclusively uses Helvetica, Courier or something like that. You'll never find Japanese Helvetica, Chinese Courier, Korean Times, Thai Utopia, ... (If I remember correctly, Alexander Malmberg once told us in discuss-gnustep that he considered to make the family specification
user-configurable.)


We seem to have a real problem here. On my machine I have about 10 different fonts from Adobe installed (of course each with dozens of styles and sizes). They have a totally different appearance and I never would want to mix them when displaying a string. Whereas I would not mind to mix Helvetica coming from different sources. Your current implementation of building up font sets would be rather unusable for any European language user (probably even for US Americans, but you never can tell), as this would merge fonts that don't belong together.

Don't worry. The X server tries loading two or more fonts only if it needs to do so. This is done based on
the locale in use.


I'd like it if the development team would allow me to do so.  I guess we
need a new boolean user default value, say, GSEnableXFontSet or
GSXEnableFontSet (or, FontSet may be replaced with MultiByte).
Could you suggest me a better name?


These two names sound fine for me, the later is perhaps a bit closer to what we have there already. Go ahead and add this, but dont forget to document it in back/Documentation/Back/DefaultsSummary.gsdoc. I think for the start the default should be NO, but we may change this as this option gets tested more.

OK, I will use GSXEnableFontSet and set its default to NO.

- Kazu






reply via email to

[Prev in Thread] Current Thread [Next in Thread]