Hi,
As you know, my locale patch has already committed into CVS.
I have an idea of improvement of my previous locale patch.
Now, Rxvt determines the number of fonts and the index
of the default font as macros, i.e., NFONTS and FONT0_IDX
in feature.h. However, number of popular fonts and the
preferable default size among these fonts are different
from encoding to encoding. Thus, I suggest
- define MAX_NFONTS in feature.h instead of NFONTS.
It can be 7. This is used only for determing the
maximum allowed nfonts, i.e., declaring char *newfont[],
_Rs_font, and _Rs_mfont in rxvt.h (they are needed
to be determined in compilation time).
- remove FONT0_IDX.
- add nfonts and font0_idx in struct rxvt_vars or so.
- rxvt_vars.nfonts and rxvt_vars.font0_idx are
initialized in rxvt_init_defaultfont().
- Struct defaultfont will have additional members of
nfonts and font0_idx, which are used in rxvt_init_defaultfont()
to initialize rxvt_vars.nfonts and rxvt_vars.font0_idx.
This improvement will have a good side effect that it
reduce the size of table of font names. For example,
a font list for Big5 has many repeating font names.
They can be truncated.
I will write a patch to do this soon.
Any suggestions?
# BTW, my defaultfont.[ch] won't work if NFONTS (or
# MAX_NFONTS in my idea) is changed, though xdefaults.c
# has a mechanism to accept NFONTS less than 8.
# I cannot re-design my defaultfont.[ch] to accept
# various NFONTS without being too ugly... Thus, can I
# propose to have fixed MAX_NFONTS (and remove #if NFONTS > n
# directives in xdefaults.c so that people don't misunderstand
# MAX_NFONTS is changable.) ?
---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://surfchem0.riken.go.jp/~kubota/
"Introduction to I18N"
http://www.debian.org/doc/manuals/intro-i18n/