Nguyen Vu Hung
2007-Oct-15 05:52 UTC
[Fontconfig] fc-list output changes from 2.2.3 to 2.4.2
Hello all, On the default installation of Redhat ES 4 ( fontconfig version 2.2.3, rpm version 2.2.3-7 ), the output of fc-list is as follows fc-list | grep Motoya MotoyaExMaru:style=W3 KP MotoyaExCedar:style=W3 mono MotoyaExCedar:style=W3 But after manually upgrading ( with ./configure --prefix=/usr; make; sudo make install ) to fontconfig 2.4.2, the output of fc-list became: $fc-list | grep W3 | grep Maru ???EX????3KP,MotoyaExMaru,???g??EX?}???x??3KP:style=Regular,W3 KP ???EX????3??,MotoyaExMaru,???g??EX?}???x??3????:style=Regular,W3 mono ???EX????3,MotoyaExMaru,???g??EX?}???x??3:style=Regular,W3 You can notice the changes: 1. The first token added: "???EX????3KP" 2. The 3rd token added: "???g??EX?}???x??3KP" ( FYI, seems like a corrupted Japanese text ). And FYI, fc-match seems to give the wrong font match: $fc-match MotoyaExMaru:W5 MTXmr3kp.ttc: "MotoyaExMaru" "W3" #W5 vs W3. Does anyone know why? And because the format of fc-list is changed, some of our cairo code that is depend of fontType ( MotoyaExCedar:style=W3 ) has stopped functioning and they felt back to system "default" font. -- Best Regards, Nguyen Hung Vu vuhung16plus{remove}@gmail.dot.com An inquisitive look at Harajuku http://www.flickr.com/photos/vuhung/sets/72157600109218238/
suzuki toshiya
2007-Oct-15 06:18 UTC
[Fontconfig] fc-list output changes from 2.2.3 to 2.4.2
Hi, Yet I''ve not tried to reproduce the problem, but the problem looks interesting. Nguyen Vu Hung wrote (2007/10/14 21:52):> Hello all, > > On the default installation of Redhat ES 4 ( fontconfig version 2.2.3, > rpm version 2.2.3-7 ), the output of fc-list is as follows > > fc-list | grep Motoya > MotoyaExMaru:style=W3 KP > MotoyaExCedar:style=W3 mono > MotoyaExCedar:style=W3 > > But after manually upgrading ( with ./configure --prefix=/usr; make; > sudo make install ) to fontconfig 2.4.2, the output of fc-list became: > > $fc-list | grep W3 | grep Maru > ???EX????3KP,MotoyaExMaru,???g??EX?}???x??3KP:style=Regular,W3 KP > ???EX????3??,MotoyaExMaru,???g??EX?}???x??3????:style=Regular,W3 mono > ???EX????3,MotoyaExMaru,???g??EX?}???x??3:style=Regular,W3 > > You can notice the changes: > > 1. The first token added: "???EX????3KP" > 2. The 3rd token added: "???g??EX?}???x??3KP" ( FYI, seems like a > corrupted Japanese text ).I guess, your Motoya font provides 3 string data for each name properties: one is Unicode, one is ASCII, and one may be Shift-JIS. Old fontconfig may find ASCII one and discard others, but new fontconfig may store all of them. Possibly the difference from "W3" (older) to "Regular,W3" (newer) may be similar.> And FYI, fc-match seems to give the wrong font match: > > $fc-match MotoyaExMaru:W5 > MTXmr3kp.ttc: "MotoyaExMaru" "W3" > > #W5 vs W3. > > Does anyone know why?Excuse me, your problem is: "both of MotoyaExMaru W3 and W5 are available, but fc-match returns W3 against the request for W5"? Or, "MotoyaExMaru W5 is not installed and fc-match is expected to return nothing, but returns MotoyaExMaru W3"? Yet I''ve not investigated the typeface matching algorithm, I want to know what''s your problem.> And because the format of fc-list is changed, some of our cairo code > that is depend of fontType ( MotoyaExCedar:style=W3 ) has stopped > functioning and they felt back to system "default" font.Regards, mpsuzuki
Nicolas Mailhot
2007-Oct-15 06:26 UTC
[Fontconfig] fc-list output changes from 2.2.3 to 2.4.2
Le lundi 15 octobre 2007 ? 14:52 +0900, Nguyen Vu Hung a ?crit :> Does anyone know why?I think fontconfig has been changed to return a list of font names instead of a single name, the first being the "real" localised font name, the second the english font name, and the third font name + font style for apps which are not able to select styles properly. Your code assumes a single element instead of a list -- Nicolas Mailhot -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20071015/5c7e15f3/attachment.pgp
Nguyen Vu Hung
2007-Oct-15 06:51 UTC
[Fontconfig] fc-list output changes from 2.2.3 to 2.4.2
Hello, 2007/10/15, suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp>:> Hi, > > Yet I''ve not tried to reproduce the problem, but the problem > looks interesting. >Please be patient because this is the first time I am working with fontconfig. So my questions my seem noobish.> I guess, your Motoya font provides 3 string data for > each name properties: one is Unicode, one is ASCII, > and one may be Shift-JIS. Old fontconfig may find > ASCII one and discard others, but new fontconfig > may store all of them. Possibly the difference from > "W3" (older) to "Regular,W3" (newer) may be similar.Thank you for your explaination. That change costed me some hours for fixing cairo code. Due to the change of fc-match, some cairo APIs also had ( forced ) to adapt with the changes.> > > And FYI, fc-match seems to give the wrong font match: > > > > $fc-match MotoyaExMaru:W5 > > MTXmr3kp.ttc: "MotoyaExMaru" "W3" > > > > #W5 vs W3. > > > > Does anyone know why? > > Excuse me, your problem is: "both of MotoyaExMaru W3 > and W5 are available, but fc-match returns W3 against > the request for W5"?Sorry for the ambiguity. You should understand "vs" like how it is used in Japan. I did meant "instead of".> Or, "MotoyaExMaru W5 is not installed and fc-match is > expected to return nothing, but returns MotoyaExMaru W3"?I don''t think the I know what is the right result ( I mean spec ) when I want to find "MotoyaExMaru W5" but "MotoyaExMaru W3" is returned. I don''t know if it is due to fc-match code or my fontconfig setting is wrong. Please let me know if I should provide my fontconfig''s configuration.> Yet I''ve not investigated the typeface matching > algorithm, I want to know what''s your problem. >As said above, I am not sure if this is a bug or fontconfig mis-configuration. Please let me know if there is anything I can do. -- Best Regards, Nguyen Hung Vu vuhung16plus{remove}@gmail.dot.com An inquisitive look at Harajuku http://www.flickr.com/photos/vuhung/sets/72157600109218238/