Re: [Fonts]New versions of mkfontscale and FreeType 2 backend

2002-04-26 Thread Rui-Xiang Guo

 It seems the problem of FT_Get_Char_Index() in checkEncoding().

Hi, I just do the quick testing work with this:
--- mkfontscale.c.orig  Wed Apr 24 16:47:01 2002
+++ mkfontscale.c   Fri Apr 26 22:39:18 2002
@@ -36,6 +36,7 @@
 #include freetype/internal/ftobjs.h
 #include freetype/internal/t1types.h
 #include freetype/ftmodule.h
+#include freetype/internal/sfnt.h
 
 #define FACE_TYPE(FACE) ((FACE)-driver-clazz-root.module_name)
 #define T1INFO(FACE) \
@@ -58,7 +59,7 @@
   adobe-standard, adobe-symbol, ibm-cp437, microsoft-cp1252,
   /* But not adobe-dingbats, as it uses generic glyph names. */
   jisx0201.1976-0, jisx0208.1983-0, jisx0208.1990-0,
-  jisx0212.1190-0, big5.eten-0, gb2312.1980-0,
+  jisx0212.1990-0, big5-0, gb2312.1980-0,
   ksc5601.1987-0, ksc5601.1992-3};
 
 char *extra_encodings_array[] =
@@ -498,6 +499,7 @@
 int i, j, c, koi8;
 char *n;
 FT_CharMap cmap;
+TT_CMapTable* ttcmap;
 
 encoding = FontEncFind(encoding_name, NULL);
 if(!encoding)
@@ -542,7 +544,13 @@
 if(CODE_IGNORED(c)) {
 continue;
 } else {
-if(FT_Get_Char_Index(face, c) == 0) {
+if(face  face-charmap) {
+ttcmap = ((TT_CharMap)face-charmap)-cmap;
+if(ttcmap-get_index)
+/* if(ttcmap-get_index(ttcmap, c) == 0)
+return 0; */
+return ttcmap-get_index(ttcmap, c);
+} else {
 return 0;
 }
 }

then I get another fonts.scale file:
28
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-jisx0208.1
983-0
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-jisx0208.1
990-0
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-big5-0
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-gb2312.198
0-0
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-ksc5601.19
87-0
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-ksc5601.19
92-3
bsmi00lp.ttf -arphic-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-p-0-iso10646-1...

What't the secret in get_index()? X-)

 2) After I add those two lines by hand, I still have to edit the fonts.alias
 file for running rxvt. The sample for 16 pixel fonts is:
...
The other two GB encoding fonts also need it.
Maybe we need a script to generate it.

 3) Besides that, I need to fix the spacing value 'p' to 'c' because the
 value 'p' will cause delay in several seconds when start-up rxvt.
...
The other two GB encoding fonts also get the same situation...

-rxg
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]New versions of mkfontscale and FreeType 2 backend

2002-04-26 Thread Juliusz Chroboczek

CC'd to Freetype.

Rui-Xiang Guo [EMAIL PROTECTED]:

RG -  jisx0212.1190-0, big5.eten-0, gb2312.1980-0,
RG +  jisx0212.1990-0, big5-0, gb2312.1980-0,

Okay, in next version.  Thanks.

RG (I tested it with Arphic TTF which be distributed with most Linux
RG distributions and all *BSD.)

Hmm, there may be problems with this font; I'm told it has bugs.
Maybe the FreeType folks can comment?

RG It seems the problem of FT_Get_Char_Index() in checkEncoding().

RG -if(FT_Get_Char_Index(face, c) == 0) {
RG +if(face  face-charmap) {
RG +ttcmap = ((TT_CharMap)face-charmap)-cmap;
RG +if(ttcmap-get_index)
RG +/* if(ttcmap-get_index(ttcmap, c) == 0)
RG +return 0; */
RG +return ttcmap-get_index(ttcmap, c);

Very curious.  I'll try to understand what's going on.

RG 3) Besides that, I need to fix the spacing value 'p' to 'c' because the
RG value 'p' will cause delay in several seconds when start-up rxvt.

Again, that's a font bug; mkfontscale tries to work out which fonts
are proportional.  On the other hand, it doesn't yet implement a
heuristic to distinguich monospaced (-m-) from charcell (-c-) fonts.

I guess a suitable heuristic would be to decalare all monospaced fonts
in East-Asian encodings to be charcell.

RG Would it be merged into next XFree snapshot?

I hope so.

Thanks,

Juliusz
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]New versions of mkfontscale and FreeType 2 backend

2002-04-26 Thread Juliusz Chroboczek

JC With type1 fonts, the UNDERLINE_POSITION is O(PIXEL_SIZE/10).  I
JC presume the sign is then the problem.

Thanks a lot for the debugging -- fix in next version.

Juliusz
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts