[poppler] Fontconfig patch
Albert Astals Cid
aacid at kde.org
Thu Jul 21 09:37:32 EST 2005
A Dimecres 20 Juliol 2005 23:37, vàreu escriure:
> Am Mittwoch, den 20.07.2005, 18:36 +0200 schrieb Albert Astals Cid:
> > > >>- but that matches windows ttf which gets wrong encoding */
> > > >>- {"Symbol", "Standard Symbols L,Symbol"},
> > >
> > > We should test if we need a special workaround for the "Symbol" font in
> > > the new fontconfig code too. As written in the comment, I had just
> > > stolen the patterns from mupdf. I never tested the old code with the
> > > Symbol font.
> >
> > Well on my system
> >
> > $ fc-match Symbol
> > s050000l.pfb: "Standard Symbols L" "Regular"
>
> That was not the problem I thought of. But now that you mention it, this
> doesn't match anything here on Ubuntu :-( Neither does Zapf Dingbats
> match anything with the default configuration.
:-( That is bad :-(
Can we hope that fontconfig packagers will improve their fontconfig file
configuration if we create a small webpage with recomedations of a few
substitutions?
> The original problem: someone might have copied all his windows ttfs,
> one of which is symbol.ttf. The comment from mupdf said that it might
> cause problems.
Does that mean that the Symbol.ttf from windows does not follows the standard
symbol PS font? I've opened both fonts with fontforge and they seem to have
teh same amount of symbols aprox.
http://usuarios.lycos.es/tsdgeos/symbol.png
>
> > > >>+FcPattern *buildFcPattern(GfxFont *font)
> > > >>+{
> > > >>+ int weight = FC_WEIGHT_NORMAL,
> > > >>+ slant = FC_SLANT_ROMAN,
> > > >>+ width = FC_WIDTH_NORMAL,
> > > >>+ spacing = FC_PROPORTIONAL;
> > > >>+ bool deleteFamily = false;
> > > >>+ char *family, *name, *lang, *aux = NULL;
> > > >>+ const char *h = NULL;
> > > >>+ FcPattern *p;
> > > >>
> > > >>- lockGlobalParams;
> > > >>- dfp = (DisplayFontParam *)displayFonts->lookup(fontName);
> > > >>- unlockGlobalParams;
> > > >>- return dfp;
> > > >>+ // this is all heuristics will be overwritten if font had proper
> > > >> info + name = font->getName()->getCString();
> > >
> > > Can getName() return NULL?
> >
> > I would say no, the only fonts that don't have name are Type 3 fonts but
> > they never reach that part of the code. But i can write a guard if you
> > think it's necessary.
>
> Someone might construct a bogus pdf file without a name to crash pdf
> viewers ;-)
Guard added :-)
Albert
>
> Regards,
>
> Martin
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
More information about the poppler
mailing list