2011/12/27 Khaled Hosny <[email protected]>:
> On Tue, Dec 27, 2011 at 06:45:14PM +0100, Zdenek Wagner wrote:
>> Can xdvipdfmx be fixed so that it uses the same search algorithm as
>> XeTeX? It would solve a lot of problems. For instance, under CentOS
>> XeTeX properly finds Urdu and Telugu fonts but xdvipdfmx does not.
>
> There was a discussion on the texlive list few weeks (months) ago and
> there was a patch by Jonathan that should fix this (on fontconfig-using
> systems at least), no idea what happened to it.
>
I managed to find Jonathan's mail:
It would break xetex on macosx (whether using xdvipdfmx or xdv2pdf),
where getFontFilename(engine) will
often return NULL.

Yes, the change is not hard, as I said earlier, but it does need to be
done with care. Probably something like
this (untested) would work:

                engine = (XeTeXLayoutEngine)fontlayoutengine[f];
-               fontRef = getFontRef(engine);
-               if (fontRef != 0)
-                       getNames(fontRef, &psName, &famName, &styName);
-               else {
-                       psName = getFontFilename(engine);
+               psName = getFontFilename(engine);
+               if (psName) {
                        famName = "";
                        styName = "";
                }
+               else {
+                       getNames(getFontRef(engine), &psName, &famName, 
&styName);
+               }

(BTW, the xetex list would be a better forum to discuss xetex bugs and patches.)

JK



> Regards,
>  Khaled
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to