John Stracke
2005-Nov-21 08:50 UTC
[Fontconfig] Re: Patch to recognize PostScript weight "Demi"
On Mon, 2004-02-16 at 11:32, John Stracke wrote:> I noticed that fontconfig 2.2.1 was reporting the wrong weight for one > of the fonts I was using ("URW Gothic L Demi Oblique"); when I dug into > it, I found that the problem was that the .pfb was declaring its weight > as "Demi", and fontconfig expected "Demibold". So I modified > fcfreetype.c to recognize "Demi" as a synonym for "Demibold". It''s a > one-liner; the patch is attached.And here''s an updated patch that also recognizes "Roman" weight as a synonym for "Normal". This comes up in the URW font Century Schoolbook L Roman. John Stracke Fran?ois Thibault Carolingia, East francis@thibault.org HTML mail OK. PGP key Please do not adjust your mind--reality is malfunctioning. My medieval art for sale
Keith Packard
2005-Nov-21 08:50 UTC
[Fontconfig] Patch to recognize PostScript weight "Demi"
Around 11 o''clock on Feb 16, John Stracke wrote:> So I modified fcfreetype.c to recognize "Demi" as a synonym for "Demibold". > It''s a one-liner; the patch is attached.Looks like someone got there before you -- ''demi'' is already recognized in the code in CVS. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040216/85ac1eec/attachment.pgp
Keith Packard
2005-Nov-21 08:50 UTC
[Fontconfig] Re: Patch to recognize PostScript weight "Demi"
Around 12 o''clock on Feb 16, John Stracke wrote:> And here''s an updated patch that also recognizes "Roman" weight as a > synonym for "Normal". This comes up in the URW font Century Schoolbook > L Roman.Is it "normal" or "medium"? By default, a name without a match in the table will be set to ''medium''. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040216/7b2bc09f/attachment.pgp
John Stracke
2005-Nov-21 08:50 UTC
[Fontconfig] Patch to recognize PostScript weight "Demi"
On Mon, 2004-02-16 at 14:52, Keith Packard wrote:> Around 11 o''clock on Feb 16, John Stracke wrote: > > > So I modified fcfreetype.c to recognize "Demi" as a synonym for "Demibold". > > It''s a one-liner; the patch is attached. > > Looks like someone got there before you -- ''demi'' is already recognized in > the code in CVS.Oh, good.> And here''s an updated patch that also recognizes "Roman" weight as a > > synonym for "Normal". This comes up in the URW font Century Schoolbook > > L Roman. > > Is it "normal" or "medium"? By default, a name without a match in the > table will be set to ''medium''.Mmm, well, I can''t read the mind of the person who created the font; but my guess would be "normal". One of its corresponding fonts is tagged as Normal Italic. Besides, when we''re talking about slants, "Roman" basically means "Normal"; I''d expect the same to hold true for weights. -- /=============================================================\ |John Stracke | http://www.thibault.org |HTML OK | |Francois Thibault |========================================| |East Kingdom |World domination should never be left to| |francis@thibault.org|chance. | \=============================================================/ My medieval art for sale: http://www.thibault.org/store/
John Stracke
2005-Nov-21 08:50 UTC
[Fontconfig] Patch to recognize PostScript weight "Demi"
I noticed that fontconfig 2.2.1 was reporting the wrong weight for one of the fonts I was using ("URW Gothic L Demi Oblique"); when I dug into it, I found that the problem was that the .pfb was declaring its weight as "Demi", and fontconfig expected "Demibold". So I modified fcfreetype.c to recognize "Demi" as a synonym for "Demibold". It''s a one-liner; the patch is attached. I don''t actually know whether "Demi" is a legitimate PostScript weight, but the URW fonts seem to be common enough that it''s probably worth supporting. Legalese: I hereby renounce copyright on this patch, putting it into the public domain. John Stracke Fran?ois Thibault Carolingia, East francis@thibault.org HTML mail OK. PGP key "Hastur was paranoid, which was simply a sensible...well-adjusted reaction to living in Hell." --_Good Omens_ My medieval art for sale -------------- next part -------------- A non-text attachment was scrubbed... Name: fontconfig-2.2.1-demi.patch Type: text/x-patch Size: 507 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040216/f569403c/fontconfig-2.2.1-demi.bin