[poppler] [KPDF-PATCH] Fontconfig support

Albert Astals Cid tsdgeos at yahoo.es
Tue Mar 22 03:03:55 PST 2005


A Dimarts 22 Març 2005 08:05, vàreu escriure:
> Albert Astals Cid wrote:
> > Hi, here comes our fontconfig patch, i see poppler has inherited from
> > evince a fontconfig function that xpdf does not have, but i think ours is
> > better, i explain the reasons:
> >
> >  - The fontconfig code in poppler right now is not able to use winddings
> > font i have installed in my system to properly render · (a dot) in
> > http://usuarios.lycos.es/tsdgeos/test.pdf and instead it renders Ÿ (Y
> > with dieresis) while our code does.
> >
> >  - FcNameParse does not works with pdf font names, we have a custom
> > parsing function.
>
> I finally got around to looking into this patch.  I do like the idea of
> parsing the weight and slant settings from the PDF font name; that
> should improve the font matching heuristic a great deal.
That should be improved a bit, 

> Martin Kretzschmar did point out to me, though, that the patch removes
> the GlobalParams::setupBaseFontsFc() function from evince, which
> initializes the 14 standard fonts using fontconfig.  But reading the
> kpdf source, it looks like you don't initialize the standard fonts at
> all (i.e. you don't call GlobalParams::setupBaseFonts() either), but
> handle all font references through the general font matching
> algorithm... correct?
No, we do globalParams->setupBaseFonts(NULL); on part.cpp but i have just 
remove it and i get the same substitutions that xpdf has (displayFontTab), 
you can test that on your system with the test program i sent
./fonttest Times-BoldItalic gets me n021024l.pfb file. (that is with 
-DWEIRD_FUN) probably thanks of my fontconfig setup? (i did not edit it)

> Provided you get decent matches for the standard fonts, I'd say this is
> probably the best way to do it.  In any case, it should be tunable by
> either adjusting the fontconfig config file, so I think it should work
> fine.  Unless anybody has any objections, I'll commit this patch in a
> day or two.
I think the same, doing forced substitutions seems a bad thing. Someone on kde 
lists told me we should work out substitutions for lots of fonts more but i 
think that is bad as we already have fontconfig for font configuring, why 
would poppler(kpdf) want to force you to have a specific font-substitution 
when you can configure it for all the system?

Albert

>
> cheers,
> Kristian



More information about the poppler mailing list