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

2002-05-24 Thread Juliusz Chroboczek

Thanks for the report and the suggestions.

RG It looks better then I added this line by hand:
RG MINGLIU.TTC -dynalab-MingLiU-medium-r-normal--0-0-0-0-m-0-big5-0

Yu Shao has just suggested to me the following heuristic for CJK
fonts: an encoding is supported by the font if fewer than 2% of the
glyphs are missing.  I'm going to implement this scheme, and Big-5
encodings should be properly generated in the next version.

RG The spacing value 'm' still will cause delay with rxvt. Don't know why. :)

There's an optimisation (hack) for charcell (as opposed to monospaced)
fonts in the FreeType backend.  The delay you're seeing is what
happens when we don't apply said hack.

RG How about using os2-ulCodePageRange1 to lookup the font encoding
RG for supporting modren Unicode encoded CJK fonts?

I need to think about it some more.  What if Microsoft comes up with
Courier New Unicode?

I'm more tempted to peek at the font's bounding box to determine if
it's charcell.  I'll need to check whether this gives good results.

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 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



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

2002-04-19 Thread Juliusz Chroboczek

JC I jus realized that there is a significant difference with the new
JC ft2 backend.  I've lost underlining in mozilla.

Please check the values of the UNDERLINE_POSITION and UNDERLINE_WIDTH
properties (xlsfonts -ll -fn 'foo').

Juliusz


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



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

2002-04-19 Thread Keith Packard


Around 17 o'clock on Apr 19, Juliusz Chroboczek wrote:

 I'm currently using two internal interfaces, which I don't wish to
 export to server modules.

(from old mail...)

   (i) to determine whether a font uses glyph names or Unicode indices
   as its native encoding format (only Type 1 fonts fall into the
   former category currently);

I need this as well to fix MathML mode in Mozilla when using Xft.  I 
believe it would be sufficient (if not exact) to simply check for type1 
fonts, with the possible exception of OpenType fonts translated directly 
from Type1 fonts.  I don't know how you'd check for that case though.

As for accessing the source-specific fields in the font, I've had the PCF 
FreeType developer suggest that as the standard way of getting at such 
information.  I'd rather have APIs that returned the private structure
from a font (null if the wrong type) so that a magic strcmp wasn't 
necessary, and so that the library could transcode the information from 
OpenType (or other wrapper font formats) if available.  As long as those 
datastructures appear in the public API for FreeType, they shouldn't 
change without a major library version number change.

Keith PackardXFree86 Core TeamCompaq Cambridge Research Lab


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



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

2002-04-19 Thread James H. Cloos Jr.

JC I just realized that there is a significant difference with the new
JC ft2 backend.  I've lost underlining in mozilla.

Juliusz Please check the values of the UNDERLINE_POSITION and
Juliusz UNDERLINE_WIDTH properties (xlsfonts -ll -fn 'foo').

With Georgia, UNDERLINE_POSITION is O(-PIXEL_SIZE/10) and thickness
is O(PIXEL_SIZE/20).  Other ttf and otf fonts seem to be the same.

With type1 fonts, the UNDERLINE_POSITION is O(PIXEL_SIZE/10).  I
presume the sign is then the problem. ... ...  Yup.  The underlines
reappear when I choose a type1 font.  I thought I tested that, but
obviously I didn't do so thoroughly. :(

-JimC

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



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

2002-04-18 Thread Juliusz Chroboczek

JC I'm running the new ft2 backend now for all scalled fonts.
JC Most everything looks good so far.

Great to know.

JC Perhaps generalizing -adobe-fontspecific into -*-fontspecific
JC would be reasonable?

Fine.  Although mkfontscale will still only generate `adobe-fontspecific'.

JC I'm also having trouble adding /usr/lib/jdk1.3/jre/lib/fonts
JC to the font path.

Permissions?  NFS authorisation? (The server runs as root, not as you.)

I'll try to see if I can reproduce it.

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



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

2002-04-18 Thread Juliusz Chroboczek

JC The average width error is still there for type1 fonts, but AFAICT
JC it affects very few programs that one usually doesn't notice.

According to David Turner, this may be a bug in FreeType 2.0.9 that
was fixed in 2.1.0.  I haven't had time to test his guess yet.

(Keith, what about importing 2.1.0?)

Juliusz

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



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

2002-04-18 Thread James H. Cloos Jr.

 Juliusz == Juliusz Chroboczek [EMAIL PROTECTED] writes:

JC I'm also having trouble adding /usr/lib/jdk1.3/jre/lib/fonts to
JC the font path.

Juliusz Permissions?  NFS authorisation? (The server runs as root,
Juliusz not as you.)

Not a permissions problem.  Everything is on hda.  Xft is able to
access those files.  I have taken another look.  The fonts.scale
generated by mkfontscale (20020417) assigned the same XLDF to more
than one ttf.  It also had bad weight values in the XLFDs.  (The
XftCache in that dir shows that all of the normal weight fonts are
weight=100 and the (demi)bold versions are all 200.  mkfontscale
returns a weight of thin for many but not all of the Lucida fonts
therein; it does get a couple of the right.)

I don't see that error in the ttmkfdir output, but there is probably
something of the sort

Both fonts.dir files result in exactly the same error, so there
probably *is* some problem with the ttmkfdir version as well.

-JimC




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