Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Better error for font face-name validation #242

Closed
springmeyer opened this issue Jan 22, 2013 · 9 comments
Closed

Better error for font face-name validation #242

springmeyer opened this issue Jan 22, 2013 · 9 comments
Milestone

Comments

@springmeyer
Copy link

Carto tries to validate fonts, given what mapnik reports. But currently the error upon an unknown font is rather confusing. I think font error reporting may demand some special casing.

Currently specifying a face name of foo that does not exist gives:

Invalid value for text-face-name, the type font is expected. foo (of type string) was given. (line 16)

Ideally we could report something more like:

The text-face-name of "foo" is not a known font on your system, please provide a face name like "DejaVu Sans Book"
@tmcw
Copy link
Contributor

tmcw commented Jan 22, 2013

Yep, and probably doable with some refactoring. Right now fonts are strings according to Carto, except for a validation step that just returns a true/false. Possibly we can cast them to actual font-value objects, or just have a more sophisticated return value to validValue.

@strk
Copy link
Contributor

strk commented Nov 12, 2013

Is it possible to plug a custom validator actually checking for availability of a font-face on the system ?

@tmcw
Copy link
Contributor

tmcw commented Nov 12, 2013

Yes, but not something I want to implement: this would introduce a dependency on some binary module or on hardcoded paths that would be different on different linux systems, and would require windows/linux/mac variants.

Not a clean feature. Much more excited to incrementally improve here.

@strk
Copy link
Contributor

strk commented Nov 12, 2013

That's why I was talking about a "pluggable" validator.
If carto allows that, someone else (not you:) could implement/publish plugins.

Personally I'll be ok with errors raised by mapnik so would likely not be one of those someones myself: mapnik/mapnik#1791

@tmcw
Copy link
Contributor

tmcw commented Nov 12, 2013

I'm afraid we're the two people who would implement this kind of thing, so the pluggable getting plugged otherwise is unlikely.

@springmeyer
Copy link
Author

Is it possible to plug a custom validator actually checking for availability of a font-face on the system ?

Carto could simply accept a optional object declaring this. I added this API to node-mapnik a while back, likely when thinking about this issue:

$ node -e "var m=require('./lib/mapnik.js');m.register_system_fonts();console.log(m.fontFiles())"
{ 'Al Bayan Bold': '/Library/Fonts/AlBayanBold.ttf',
  'Al Bayan Plain': '/Library/Fonts/AlBayan.ttf',
  'American Typewriter Bold': '/Library/Fonts/AmericanTypewriter.ttc',
  'American Typewriter Condensed': '/Library/Fonts/AmericanTypewriter.ttc',
  'American Typewriter Condensed Bold': '/Library/Fonts/AmericanTypewriter.ttc',
  'American Typewriter Condensed Light': '/Library/Fonts/AmericanTypewriter.ttc',
  'American Typewriter Light': '/Library/Fonts/AmericanTypewriter.ttc',
  'American Typewriter Regular': '/Library/Fonts/AmericanTypewriter.ttc',
  'Andale Mono Regular': '/Library/Fonts/Andale Mono.ttf',
  'Apple Braille Outline 6 Dot': '/System/Library/Fonts/Apple Braille Outline 6 Dot.ttf',
  'Apple Braille Outline 8 Dot': '/System/Library/Fonts/Apple Braille Outline 8 Dot.ttf',
  'Apple Braille Pinpoint 6 Dot': '/System/Library/Fonts/Apple Braille Pinpoint 6 Dot.ttf',
  'Apple Braille Pinpoint 8 Dot': '/System/Library/Fonts/Apple Braille Pinpoint 8 Dot.ttf',
  'Apple Braille Regular': '/System/Library/Fonts/Apple Braille.ttf',
  'Apple Chancery Chancery': '/Library/Fonts/Apple Chancery.ttf',
  'Apple Color Emoji Regular': '/System/Library/Fonts/Apple Color Emoji.ttf',
  'Apple LiGothic Medium': '/Library/Fonts/Apple LiGothic Medium.ttf',
  'Apple LiSung Light': '/Library/Fonts/Apple LiSung Light.ttf',
  'Apple SD Gothic Neo Bold': '/System/Library/Fonts/AppleSDGothicNeo-Bold.otf',
  'Apple SD Gothic Neo ExtraBold': '/Library/Fonts/AppleSDGothicNeo-ExtraBold.otf',
  'Apple SD Gothic Neo Heavy': '/Library/Fonts/AppleSDGothicNeo-Heavy.otf',
  'Apple SD Gothic Neo Light': '/Library/Fonts/AppleSDGothicNeo-Light.otf',
  'Apple SD Gothic Neo Medium': '/Library/Fonts/AppleSDGothicNeo-Medium.otf',
  'Apple SD Gothic Neo Regular': '/System/Library/Fonts/AppleSDGothicNeo-Regular.otf',
  'Apple SD Gothic Neo SemiBold': '/Library/Fonts/AppleSDGothicNeo-SemiBold.otf',
  'Apple SD Gothic Neo Thin': '/Library/Fonts/AppleSDGothicNeo-Thin.otf',
  'Apple SD Gothic Neo UltraLight': '/Library/Fonts/AppleSDGothicNeo-UltraLight.otf',
  'Apple Symbols Regular': '/System/Library/Fonts/Apple Symbols.ttf',
  'AppleGothic Regular': '/Library/Fonts/AppleGothic.ttf',
  'AppleMyungjo Regular': '/Library/Fonts/AppleMyungjo.ttf',
  'Arial Black Regular': '/Library/Fonts/Arial Black.ttf',
  'Arial Bold': '/Library/Fonts/Arial Bold.ttf',
  'Arial Bold Italic': '/Library/Fonts/Arial Bold Italic.ttf',
  'Arial Hebrew Bold': '/Library/Fonts/ArialHBBold.ttf',
  'Arial Hebrew Regular': '/Library/Fonts/ArialHB.ttf',
  'Arial Italic': '/Library/Fonts/Arial Italic.ttf',
  'Arial Narrow Bold': '/Library/Fonts/Arial Narrow Bold.ttf',
  'Arial Narrow Bold Italic': '/Library/Fonts/Arial Narrow Bold Italic.ttf',
  'Arial Narrow Italic': '/Library/Fonts/Arial Narrow Italic.ttf',
  'Arial Narrow Regular': '/Library/Fonts/Arial Narrow.ttf',
  'Arial Regular': '/Library/Fonts/Arial.ttf',
  'Arial Rounded MT Bold Regular': '/Library/Fonts/Arial Rounded Bold.ttf',
  'Arial Unicode MS Regular': '/Library/Fonts/Arial Unicode.ttf',
  'Avenir Black': '/Library/Fonts/Avenir.ttc',
  'Avenir Black Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Book': '/Library/Fonts/Avenir.ttc',
  'Avenir Book Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Heavy': '/Library/Fonts/Avenir.ttc',
  'Avenir Heavy Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Light': '/Library/Fonts/Avenir.ttc',
  'Avenir Light Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Medium': '/Library/Fonts/Avenir.ttc',
  'Avenir Medium Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Next Bold': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Bold Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Condensed Bold': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Bold Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Demi Bold': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Demi Bold Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Heavy': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Heavy Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Medium': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Medium Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Regular': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Ultra Light': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Condensed Ultra Light Italic': '/Library/Fonts/Avenir Next Condensed.ttc',
  'Avenir Next Demi Bold': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Demi Bold Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Heavy': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Heavy Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Medium': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Medium Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Regular': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Ultra Light': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Next Ultra Light Italic': '/Library/Fonts/Avenir Next.ttc',
  'Avenir Oblique': '/Library/Fonts/Avenir.ttc',
  'Avenir Roman': '/Library/Fonts/Avenir.ttc',
  'Ayuthaya Regular': '/Library/Fonts/Ayuthaya.ttf',
  'Baghdad Regular': '/Library/Fonts/Baghdad.ttf',
  'Bangla MN Bold': '/Library/Fonts/Bangla MN.ttc',
  'Bangla MN Regular': '/Library/Fonts/Bangla MN.ttc',
  'Bangla Sangam MN Bold': '/Library/Fonts/Bangla Sangam MN.ttc',
  'Bangla Sangam MN Regular': '/Library/Fonts/Bangla Sangam MN.ttc',
  'Baskerville Bold': '/Library/Fonts/Baskerville.ttc',
  'Baskerville Bold Italic': '/Library/Fonts/Baskerville.ttc',
  'Baskerville Italic': '/Library/Fonts/Baskerville.ttc',
  'Baskerville Regular': '/Library/Fonts/Baskerville.ttc',
  'Baskerville SemiBold': '/Library/Fonts/Baskerville.ttc',
  'Baskerville SemiBold Italic': '/Library/Fonts/Baskerville.ttc',
  'BiauKai Regular': '/Library/Fonts/BiauKai.ttf',
  'Big Caslon Medium': '/Library/Fonts/BigCaslon.ttf',
  'Bitstream Charter Bold': '/usr/X11R6/lib/X11/fonts/Type1/c0632bt_.pfb',
  'Bitstream Charter Bold Italic': '/usr/X11R6/lib/X11/fonts/Type1/c0633bt_.pfb',
  'Bitstream Charter Italic': '/usr/X11R6/lib/X11/fonts/Type1/c0649bt_.pfb',
  'Bitstream Charter Regular': '/usr/X11R6/lib/X11/fonts/Type1/c0648bt_.pfb',
  'Bitstream Vera Sans Bold': '/usr/X11R6/lib/X11/fonts/TTF/VeraBd.ttf',
  'Bitstream Vera Sans Bold Oblique': '/usr/X11R6/lib/X11/fonts/TTF/VeraBI.ttf',
  'Bitstream Vera Sans Mono Bold': '/usr/X11R6/lib/X11/fonts/TTF/VeraMoBd.ttf',
  'Bitstream Vera Sans Mono Bold Oblique': '/usr/X11R6/lib/X11/fonts/TTF/VeraMoBI.ttf',
  'Bitstream Vera Sans Mono Oblique': '/usr/X11R6/lib/X11/fonts/TTF/VeraMoIt.ttf',
  'Bitstream Vera Sans Mono Roman': '/usr/X11R6/lib/X11/fonts/TTF/VeraMono.ttf',
  'Bitstream Vera Sans Oblique': '/usr/X11R6/lib/X11/fonts/TTF/VeraIt.ttf',
  'Bitstream Vera Sans Roman': '/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf',
  'Bitstream Vera Serif Bold': '/usr/X11R6/lib/X11/fonts/TTF/VeraSeBd.ttf',
  'Bitstream Vera Serif Roman': '/usr/X11R6/lib/X11/fonts/TTF/VeraSe.ttf',
  'Brush Script MT Italic': '/Library/Fonts/Brush Script.ttf',
  'Cantarell Regular': '/Users/dane/Library/Fonts/Cantarell-Regular.ttf',
  'Capitals Regular': '/Library/Fonts/Capitals.dfont',
  'Chalkboard Bold': '/Library/Fonts/Chalkboard.ttc',
  'Chalkboard Regular': '/Library/Fonts/Chalkboard.ttc',
  'Chalkboard SE Bold': '/Library/Fonts/ChalkboardSE.ttc',
  'Chalkboard SE Light': '/Library/Fonts/ChalkboardSE.ttc',
  'Chalkboard SE Regular': '/Library/Fonts/ChalkboardSE.ttc',
  'Chalkduster Regular': '/Library/Fonts/Chalkduster.ttf',
  'Charcoal CY Regular': '/Library/Fonts/CharcoalCY.dfont',
  'Cochin Bold': '/Library/Fonts/Cochin.ttc',
  'Cochin BoldItalic': '/Library/Fonts/Cochin.ttc',
  'Cochin Italic': '/Library/Fonts/Cochin.ttc',
  'Cochin Regular': '/Library/Fonts/Cochin.ttc',
  'Comic Sans MS Bold': '/Library/Fonts/Comic Sans MS Bold.ttf',
  'Comic Sans MS Regular': '/Library/Fonts/Comic Sans MS.ttf',
  'Copperplate Bold': '/Library/Fonts/Copperplate.ttc',
  'Copperplate Light': '/Library/Fonts/Copperplate.ttc',
  'Copperplate Regular': '/Library/Fonts/Copperplate.ttc',
  'Corsiva Hebrew Bold': '/Library/Fonts/CorsivaBold.ttf',
  'Corsiva Hebrew Regular': '/Library/Fonts/Corsiva.ttf',
  'Courier 10 Pitch Bold': '/usr/X11R6/lib/X11/fonts/Type1/c0583bt_.pfb',
  'Courier 10 Pitch Bold Italic': '/usr/X11R6/lib/X11/fonts/Type1/c0611bt_.pfb',
  'Courier 10 Pitch Italic': '/usr/X11R6/lib/X11/fonts/Type1/c0582bt_.pfb',
  'Courier 10 Pitch Regular': '/usr/X11R6/lib/X11/fonts/Type1/c0419bt_.pfb',
  'Courier Bold': '/System/Library/Fonts/Courier.dfont',
  'Courier Bold Italic': '/usr/X11R6/lib/X11/fonts/Type1/courbi.pfa',
  'Courier Bold Oblique': '/System/Library/Fonts/Courier.dfont',
  'Courier Italic': '/usr/X11R6/lib/X11/fonts/Type1/couri.pfa',
  'Courier New Bold': '/Library/Fonts/Courier New Bold.ttf',
  'Courier New Bold Italic': '/Library/Fonts/Courier New Bold Italic.ttf',
  'Courier New Italic': '/Library/Fonts/Courier New Italic.ttf',
  'Courier New Regular': '/Library/Fonts/Courier New.ttf',
  'Courier Oblique': '/System/Library/Fonts/Courier.dfont',
  'Courier Regular': '/System/Library/Fonts/Courier.dfont',
  'Cursor Regular': '/usr/X11R6/lib/X11/fonts/Type1/cursor.pfa',
  'Damascus Bold': '/Library/Fonts/Damascus.ttc',
  'Damascus Regular': '/Library/Fonts/Damascus.ttc',
  'DecoType Naskh Regular': '/Library/Fonts/DecoTypeNaskh.ttf',
  'DejaVu Sans Book': '/Users/dane/Library/Fonts/DejaVuSans.ttf',
  'Devanagari MT Bold': '/Library/Fonts/DevanagariMTBold.ttf',
  'Devanagari MT Regular': '/Library/Fonts/DevanagariMT.ttf',
  'Devanagari Sangam MN Bold': '/Library/Fonts/Devanagari Sangam MN.ttc',
  'Devanagari Sangam MN Regular': '/Library/Fonts/Devanagari Sangam MN.ttc',
  'Didot Bold': '/Library/Fonts/Didot.ttc',
  'Didot Italic': '/Library/Fonts/Didot.ttc',
  'Didot Regular': '/Library/Fonts/Didot.ttc',
  'East Syriac Adiabene Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAdiabene.otf',
  'East Syriac Ctesiphon Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMCtesiphon.otf',
  'Estrangelo Antioch Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAntioch.otf',
  'Estrangelo Edessa Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMEdessa.otf',
  'Estrangelo Midyat Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMMidyat.otf',
  'Estrangelo Nisibin Outline Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMNisibinOutline.otf',
  'Estrangelo Nisibin Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMNisibin.otf',
  'Estrangelo Quenneshrin Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMQenNeshrin.otf',
  'Estrangelo Talada Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMTalada.otf',
  'Estrangelo TurAbdin Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMTurAbdin.otf',
  'Euphemia UCAS Bold': '/Library/Fonts/EuphemiaCAS.ttc',
  'Euphemia UCAS Italic': '/Library/Fonts/EuphemiaCAS.ttc',
  'Euphemia UCAS Regular': '/Library/Fonts/EuphemiaCAS.ttc',
  'Exo Regular': '/Users/dane/Library/Fonts/Exo-Regular.otf',
  'Futura Condensed ExtraBold': '/Library/Fonts/Futura.ttc',
  'Futura Condensed Medium': '/Library/Fonts/Futura.ttc',
  'Futura Medium': '/Library/Fonts/Futura.ttc',
  'Futura Medium Italic': '/Library/Fonts/Futura.ttc',
  'Geeza Pro Bold': '/System/Library/Fonts/Geeza Pro Bold.ttf',
  'Geeza Pro Regular': '/System/Library/Fonts/Geeza Pro.ttf',
  'Geneva CY Regular': '/Library/Fonts/GenevaCY.dfont',
  'Geneva Regular': '/System/Library/Fonts/Geneva.dfont',
  'Georgia Bold': '/Library/Fonts/Georgia Bold.ttf',
  'Georgia Bold Italic': '/Library/Fonts/Georgia Bold Italic.ttf',
  'Georgia Italic': '/Library/Fonts/Georgia Italic.ttf',
  'Georgia Regular': '/Library/Fonts/Georgia.ttf',
  'Gill Sans Bold': '/Library/Fonts/GillSans.ttc',
  'Gill Sans Bold Italic': '/Library/Fonts/GillSans.ttc',
  'Gill Sans Italic': '/Library/Fonts/GillSans.ttc',
  'Gill Sans Light': '/Library/Fonts/GillSans.ttc',
  'Gill Sans Light Italic': '/Library/Fonts/GillSans.ttc',
  'Gill Sans Regular': '/Library/Fonts/GillSans.ttc',
  'Goha-Tibeb Zemen Regular': '/usr/X11R6/lib/X11/fonts/OTF/GohaTibebZemen.otf',
  'Gujarati MT Bold': '/Library/Fonts/GujaratiMTBold.ttf',
  'Gujarati MT Regular': '/Library/Fonts/GujaratiMT.ttf',
  'Gujarati Sangam MN Bold': '/Library/Fonts/Gujarati Sangam MN.ttc',
  'Gujarati Sangam MN Regular': '/Library/Fonts/Gujarati Sangam MN.ttc',
  'GungSeo Regular': '/Library/Fonts/Gungseouche.ttf',
  'Gurmukhi MN Bold': '/Library/Fonts/Gurmukhi MN.ttc',
  'Gurmukhi MN Regular': '/Library/Fonts/Gurmukhi MN.ttc',
  'Gurmukhi MT Regular': '/Library/Fonts/Gurmukhi.ttf',
  'Gurmukhi Sangam MN Bold': '/Library/Fonts/Gurmukhi Sangam MN.ttc',
  'Gurmukhi Sangam MN Regular': '/Library/Fonts/Gurmukhi Sangam MN.ttc',
  'HeadLineA Regular': '/Library/Fonts/HeadlineA.ttf',
  'Hei Regular': '/Library/Fonts/Hei.ttf',
  'Heiti SC Light': '/System/Library/Fonts/STHeiti Light.ttc',
  'Heiti SC Medium': '/System/Library/Fonts/STHeiti Medium.ttc',
  'Heiti TC Light': '/System/Library/Fonts/STHeiti Light.ttc',
  'Heiti TC Medium': '/System/Library/Fonts/STHeiti Medium.ttc',
  'Helvetica Bold': '/System/Library/Fonts/Helvetica.dfont',
  'Helvetica Bold Oblique': '/System/Library/Fonts/Helvetica.dfont',
  'Helvetica CY Bold': '/Library/Fonts/HelveticaCY.dfont',
  'Helvetica CY BoldOblique': '/Library/Fonts/HelveticaCY.dfont',
  'Helvetica CY Oblique': '/Library/Fonts/HelveticaCY.dfont',
  'Helvetica CY Plain': '/Library/Fonts/HelveticaCY.dfont',
  'Helvetica Light': '/System/Library/Fonts/Helvetica.dfont',
  'Helvetica Light Oblique': '/System/Library/Fonts/Helvetica.dfont',
  'Helvetica Neue Bold': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Bold Italic': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Condensed Black': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Condensed Bold': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Italic': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue LT Pro 77 Bold Condensed': '/Users/dane/Library/Fonts/HelveticaNeueLTPro-BdCn_0.otf',
  'Helvetica Neue Light': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Light Italic': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Medium': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue Regular': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue UltraLight': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Neue UltraLight Italic': '/System/Library/Fonts/HelveticaNeue.dfont',
  'Helvetica Oblique': '/System/Library/Fonts/Helvetica.dfont',
  'Helvetica Regular': '/System/Library/Fonts/Helvetica.dfont',
  'Herculanum Regular': '/Library/Fonts/Herculanum.ttf',
  'Hiragino Kaku Gothic Pro W3': '/Library/Fonts/ヒラギノ角ゴ Pro W3.otf',
  'Hiragino Kaku Gothic Pro W6': '/Library/Fonts/ヒラギノ角ゴ Pro W6.otf',
  'Hiragino Kaku Gothic ProN W3': '/System/Library/Fonts/ヒラギノ角ゴ ProN W3.otf',
  'Hiragino Kaku Gothic ProN W6': '/System/Library/Fonts/ヒラギノ角ゴ ProN W6.otf',
  'Hiragino Kaku Gothic Std W8': '/Library/Fonts/ヒラギノ角ゴ Std W8.otf',
  'Hiragino Kaku Gothic StdN W8': '/Library/Fonts/ヒラギノ角ゴ StdN W8.otf',
  'Hiragino Maru Gothic Pro W4': '/Library/Fonts/ヒラギノ丸ゴ Pro W4.otf',
  'Hiragino Maru Gothic ProN W4': '/Library/Fonts/ヒラギノ丸ゴ ProN W4.otf',
  'Hiragino Mincho Pro W3': '/Library/Fonts/ヒラギノ明朝 Pro W3.otf',
  'Hiragino Mincho Pro W6': '/Library/Fonts/ヒラギノ明朝 Pro W6.otf',
  'Hiragino Mincho ProN W3': '/System/Library/Fonts/ヒラギノ明朝 ProN W3.otf',
  'Hiragino Mincho ProN W6': '/System/Library/Fonts/ヒラギノ明朝 ProN W6.otf',
  'Hiragino Sans GB W3': '/Library/Fonts/Hiragino Sans GB W3.otf',
  'Hiragino Sans GB W6': '/Library/Fonts/Hiragino Sans GB W6.otf',
  'Hoefler Text Black': '/Library/Fonts/Hoefler Text.ttc',
  'Hoefler Text Black Italic': '/Library/Fonts/Hoefler Text.ttc',
  'Hoefler Text Italic': '/Library/Fonts/Hoefler Text.ttc',
  'Hoefler Text Ornaments': '/Library/Fonts/Hoefler Text Ornaments.ttf',
  'Hoefler Text Regular': '/Library/Fonts/Hoefler Text.ttc',
  'Impact Regular': '/Library/Fonts/Impact.ttf',
  'InaiMathi Regular': '/Library/Fonts/InaiMathi.ttf',
  'Kai Regular': '/Library/Fonts/Kai.ttf',
  'Kailasa Regular': '/Library/Fonts/Kailasa.ttf',
  'Kaiti SC Black': '/Library/Fonts/楷体.ttc',
  'Kaiti SC Bold': '/Library/Fonts/楷体.ttc',
  'Kaiti SC Regular': '/Library/Fonts/楷体.ttc',
  'Kannada MN Bold': '/Library/Fonts/Kannada MN.ttc',
  'Kannada MN Regular': '/Library/Fonts/Kannada MN.ttc',
  'Kannada Sangam MN Bold': '/Library/Fonts/Kannada Sangam MN.ttc',
  'Kannada Sangam MN Regular': '/Library/Fonts/Kannada Sangam MN.ttc',
  'Kefa Bold': '/Library/Fonts/Kefa.ttc',
  'Kefa Regular': '/Library/Fonts/Kefa.ttc',
  'Khmer MN Bold': '/Library/Fonts/Khmer MN.ttc',
  'Khmer MN Regular': '/Library/Fonts/Khmer MN.ttc',
  'Khmer Sangam MN Regular': '/Library/Fonts/Khmer Sangam MN.ttf',
  'Kokonor Regular': '/Library/Fonts/Kokonor.ttf',
  'Krungthep Regular': '/Library/Fonts/Krungthep.ttf',
  'KufiStandardGK Regular': '/Library/Fonts/KufiStandardGK.ttf',
  'Lao MN Bold': '/Library/Fonts/Lao MN.ttc',
  'Lao MN Regular': '/Library/Fonts/Lao MN.ttc',
  'Lao Sangam MN Regular': '/Library/Fonts/Lao Sangam MN.ttf',
  'LastResort Regular': '/System/Library/Fonts/LastResort.ttf',
  'LiHei Pro Medium': '/Library/Fonts/儷黑 Pro.ttf',
  'LiSong Pro Light': '/Library/Fonts/儷宋 Pro.ttf',
  'Lohit Bengali Regular': '/Users/dane/Library/Fonts/Lohit-Bengali.ttf',
  'Lucida Grande Bold': '/System/Library/Fonts/LucidaGrande.ttc',
  'Lucida Grande Regular': '/System/Library/Fonts/LucidaGrande.ttc',
  'Luxi Mono Bold': '/usr/X11R6/lib/X11/fonts/TTF/luximb.ttf',
  'Luxi Mono Bold Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luximbi.ttf',
  'Luxi Mono Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf',
  'Luxi Mono Regular': '/usr/X11R6/lib/X11/fonts/TTF/luximr.ttf',
  'Luxi Sans Bold': '/usr/X11R6/lib/X11/fonts/TTF/luxisb.ttf',
  'Luxi Sans Bold Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luxisbi.ttf',
  'Luxi Sans Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luxisri.ttf',
  'Luxi Sans Regular': '/usr/X11R6/lib/X11/fonts/TTF/luxisr.ttf',
  'Luxi Serif Bold': '/usr/X11R6/lib/X11/fonts/TTF/luxirb.ttf',
  'Luxi Serif Bold Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luxirbi.ttf',
  'Luxi Serif Oblique': '/usr/X11R6/lib/X11/fonts/TTF/luxirri.ttf',
  'Luxi Serif Regular': '/usr/X11R6/lib/X11/fonts/TTF/luxirr.ttf',
  'Malayalam MN Bold': '/Library/Fonts/Malayalam MN.ttc',
  'Malayalam MN Regular': '/Library/Fonts/Malayalam MN.ttc',
  'Malayalam Sangam MN Bold': '/Library/Fonts/Malayalam Sangam MN.ttc',
  'Malayalam Sangam MN Regular': '/Library/Fonts/Malayalam Sangam MN.ttc',
  'Marion Bold': '/Library/Fonts/Marion.ttc',
  'Marion Italic': '/Library/Fonts/Marion.ttc',
  'Marion Regular': '/Library/Fonts/Marion.ttc',
  'Marker Felt Thin': '/System/Library/Fonts/MarkerFelt.ttc',
  'Marker Felt Wide': '/System/Library/Fonts/MarkerFelt.ttc',
  'Menlo Bold': '/System/Library/Fonts/Menlo.ttc',
  'Menlo Bold Italic': '/System/Library/Fonts/Menlo.ttc',
  'Menlo Italic': '/System/Library/Fonts/Menlo.ttc',
  'Menlo Regular': '/System/Library/Fonts/Menlo.ttc',
  'Microsoft Sans Serif Regular': '/Library/Fonts/Microsoft Sans Serif.ttf',
  'Monaco Regular': '/System/Library/Fonts/Monaco.dfont',
  'Mro Unicode Regular': '/Users/dane/Library/Fonts/MroUnicode-Regular.ttf',
  'Mshtakan Bold': '/Library/Fonts/MshtakanBold.ttf',
  'Mshtakan BoldOblique': '/Library/Fonts/MshtakanBoldOblique.ttf',
  'Mshtakan Oblique': '/Library/Fonts/MshtakanOblique.ttf',
  'Mshtakan Regular': '/Library/Fonts/MshtakanRegular.ttf',
  'Mutlu  Ornamental': '/Users/dane/Library/Fonts/Mutlu__Ornamental.ttf',
  'Myanmar MN Bold': '/Library/Fonts/Myanmar MN.ttc',
  'Myanmar MN Regular': '/Library/Fonts/Myanmar MN.ttc',
  'Myanmar Sangam MN Regular': '/Library/Fonts/Myanmar Sangam MN.ttf',
  'Nadeem Regular': '/Library/Fonts/Nadeem.ttf',
  'Nanum Brush Script Regular': '/Library/Fonts/NanumScript.ttc',
  'Nanum Gothic Bold': '/Library/Fonts/NanumGothic.ttc',
  'Nanum Gothic ExtraBold': '/Library/Fonts/NanumGothic.ttc',
  'Nanum Gothic Regular': '/Library/Fonts/NanumGothic.ttc',
  'Nanum Myeongjo Bold': '/Library/Fonts/NanumMyeongjo.ttc',
  'Nanum Myeongjo ExtraBold': '/Library/Fonts/NanumMyeongjo.ttc',
  'Nanum Myeongjo Regular': '/Library/Fonts/NanumMyeongjo.ttc',
  'Nanum Pen Script Regular': '/Library/Fonts/NanumScript.ttc',
  'New Peninim MT Bold': '/Library/Fonts/NewPeninimMTBold.ttf',
  'New Peninim MT Bold Inclined': '/Library/Fonts/NewPeninimMTBoldInclined.ttf',
  'New Peninim MT Inclined': '/Library/Fonts/NewPeninimMTInclined.ttf',
  'New Peninim MT Regular': '/Library/Fonts/NewPeninimMT.ttf',
  'Noteworthy Bold': '/System/Library/Fonts/Noteworthy.ttc',
  'Noteworthy Light': '/System/Library/Fonts/Noteworthy.ttc',
  'Optima Bold': '/Library/Fonts/Optima.ttc',
  'Optima Bold Italic': '/Library/Fonts/Optima.ttc',
  'Optima ExtraBlack': '/Library/Fonts/Optima.ttc',
  'Optima Italic': '/Library/Fonts/Optima.ttc',
  'Optima Regular': '/Library/Fonts/Optima.ttc',
  'Oriya MN Bold': '/Library/Fonts/Oriya MN.ttc',
  'Oriya MN Regular': '/Library/Fonts/Oriya MN.ttc',
  'Oriya Sangam MN Bold': '/Library/Fonts/Oriya Sangam MN.ttc',
  'Oriya Sangam MN Regular': '/Library/Fonts/Oriya Sangam MN.ttc',
  'Osaka Regular': '/Library/Fonts/Osaka.ttf',
  'Osaka Regular-Mono': '/Library/Fonts/OsakaMono.ttf',
  'PCMyungjo Regular': '/Library/Fonts/PCmyoungjo.ttf',
  'PT Sans Bold': '/Library/Fonts/PTSans.ttc',
  'PT Sans Bold Italic': '/Library/Fonts/PTSans.ttc',
  'PT Sans Caption Bold': '/Library/Fonts/PTSans.ttc',
  'PT Sans Caption Regular': '/Library/Fonts/PTSans.ttc',
  'PT Sans Italic': '/Library/Fonts/PTSans.ttc',
  'PT Sans Narrow Bold': '/Library/Fonts/PTSans.ttc',
  'PT Sans Narrow Regular': '/Library/Fonts/PTSans.ttc',
  'PT Sans Regular': '/Library/Fonts/PTSans.ttc',
  'PT Serif Bold Italic': '/Users/dane/Library/Fonts/PTF76F.ttf',
  'Palatino Bold': '/Library/Fonts/Palatino.ttc',
  'Palatino Bold Italic': '/Library/Fonts/Palatino.ttc',
  'Palatino Italic': '/Library/Fonts/Palatino.ttc',
  'Palatino Regular': '/Library/Fonts/Palatino.ttc',
  'Papyrus Condensed': '/Library/Fonts/Papyrus.ttc',
  'Papyrus Regular': '/Library/Fonts/Papyrus.ttc',
  'PilGi Regular': '/Library/Fonts/Pilgiche.ttf',
  'Plantagenet Cherokee Regular': '/Library/Fonts/PlantagenetCherokee.ttf',
  'Raanana Bold': '/Library/Fonts/RaananaBold.ttf',
  'Raanana Regular': '/Library/Fonts/Raanana.ttf',
  'STFangsong Regular': '/Library/Fonts/华文仿宋.ttf',
  'STHeiti Light': '/Library/Fonts/华文细黑.ttf',
  'STHeiti Regular': '/Library/Fonts/华文黑体.ttf',
  'STIXGeneral Bold': '/Library/Fonts/STIXGeneralBol.otf',
  'STIXGeneral Bold Italic': '/Library/Fonts/STIXGeneralBolIta.otf',
  'STIXGeneral Italic': '/Library/Fonts/STIXGeneralItalic.otf',
  'STIXGeneral Regular': '/Library/Fonts/STIXGeneral.otf',
  'STIXIntegralsD Bold': '/Library/Fonts/STIXIntDBol.otf',
  'STIXIntegralsD Regular': '/Library/Fonts/STIXIntDReg.otf',
  'STIXIntegralsSm Bold': '/Library/Fonts/STIXIntSmBol.otf',
  'STIXIntegralsSm Regular': '/Library/Fonts/STIXIntSmReg.otf',
  'STIXIntegralsUp Bold': '/Library/Fonts/STIXIntUpBol.otf',
  'STIXIntegralsUp Regular': '/Library/Fonts/STIXIntUpReg.otf',
  'STIXIntegralsUpD Bold': '/Library/Fonts/STIXIntUpDBol.otf',
  'STIXIntegralsUpD Regular': '/Library/Fonts/STIXIntUpDReg.otf',
  'STIXIntegralsUpSm Bold': '/Library/Fonts/STIXIntUpSmBol.otf',
  'STIXIntegralsUpSm Regular': '/Library/Fonts/STIXIntUpSmReg.otf',
  'STIXNonUnicode Bold': '/Library/Fonts/STIXNonUniBol.otf',
  'STIXNonUnicode Bold Italic': '/Library/Fonts/STIXNonUniBolIta.otf',
  'STIXNonUnicode Italic': '/Library/Fonts/STIXNonUniIta.otf',
  'STIXNonUnicode Regular': '/Library/Fonts/STIXNonUni.otf',
  'STIXSizeFiveSym Regular': '/Library/Fonts/STIXSizFiveSymReg.otf',
  'STIXSizeFourSym Bold': '/Library/Fonts/STIXSizFourSymBol.otf',
  'STIXSizeFourSym Regular': '/Library/Fonts/STIXSizFourSymReg.otf',
  'STIXSizeOneSym Bold': '/Library/Fonts/STIXSizOneSymBol.otf',
  'STIXSizeOneSym Regular': '/Library/Fonts/STIXSizOneSymReg.otf',
  'STIXSizeThreeSym Bold': '/Library/Fonts/STIXSizThreeSymBol.otf',
  'STIXSizeThreeSym Regular': '/Library/Fonts/STIXSizThreeSymReg.otf',
  'STIXSizeTwoSym Bold': '/Library/Fonts/STIXSizTwoSymBol.otf',
  'STIXSizeTwoSym Regular': '/Library/Fonts/STIXSizTwoSymReg.otf',
  'STIXVariants Bold': '/Library/Fonts/STIXVarBol.otf',
  'STIXVariants Regular': '/Library/Fonts/STIXVar.otf',
  'STKaiti Regular': '/Library/Fonts/楷体.ttc',
  'STSong Regular': '/Library/Fonts/宋体.ttc',
  'Sathu Regular': '/Library/Fonts/Sathu.ttf',
  'Serto Batnan Bold': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMBatnanBold.otf',
  'Serto Batnan Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMBatnan.otf',
  'Serto Jerusalem Bold': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMJerusalemBold.otf',
  'Serto Jerusalem Italic': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMJerusalemItalic.otf',
  'Serto Jerusalem Outline Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMJerusalemOutline.otf',
  'Serto Jerusalem Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMJerusalem.otf',
  'Serto Kharput Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMKharput.otf',
  'Serto Malankara Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMMalankara.otf',
  'Serto Mardin Bold': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMMardinBold.otf',
  'Serto Mardin Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMMardin.otf',
  'Serto Urhoy Bold': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMUrhoyBold.otf',
  'Serto Urhoy Regular': '/usr/X11R6/lib/X11/fonts/OTF/SyrCOMUrhoy.otf',
  'Silom Regular': '/Library/Fonts/Silom.ttf',
  'Sinhala MN Bold': '/Library/Fonts/Sinhala MN.ttc',
  'Sinhala MN Regular': '/Library/Fonts/Sinhala MN.ttc',
  'Sinhala Sangam MN Bold': '/Library/Fonts/Sinhala Sangam MN.ttc',
  'Sinhala Sangam MN Regular': '/Library/Fonts/Sinhala Sangam MN.ttc',
  'Skia Regular': '/Library/Fonts/Skia.ttf',
  'Songti SC Black': '/Library/Fonts/宋体.ttc',
  'Songti SC Bold': '/Library/Fonts/宋体.ttc',
  'Songti SC Light': '/Library/Fonts/宋体.ttc',
  'Songti SC Regular': '/Library/Fonts/宋体.ttc',
  'Symbol Regular': '/System/Library/Fonts/Symbol.ttf',
  'Tahoma Bold': '/Library/Fonts/Tahoma Bold.ttf',
  'Tahoma Regular': '/Library/Fonts/Tahoma.ttf',
  'Tamil MN Bold': '/Library/Fonts/Tamil MN.ttc',
  'Tamil MN Regular': '/Library/Fonts/Tamil MN.ttc',
  'Tamil Sangam MN Bold': '/Library/Fonts/Tamil Sangam MN.ttc',
  'Tamil Sangam MN Regular': '/Library/Fonts/Tamil Sangam MN.ttc',
  'Telugu MN Bold': '/Library/Fonts/Telugu MN.ttc',
  'Telugu MN Regular': '/Library/Fonts/Telugu MN.ttc',
  'Telugu Sangam MN Bold': '/Library/Fonts/Telugu Sangam MN.ttc',
  'Telugu Sangam MN Regular': '/Library/Fonts/Telugu Sangam MN.ttc',
  'Thonburi Bold': '/System/Library/Fonts/ThonburiBold.ttf',
  'Thonburi Regular': '/System/Library/Fonts/Thonburi.ttf',
  'Times Bold': '/System/Library/Fonts/Times.dfont',
  'Times Bold Italic': '/System/Library/Fonts/Times.dfont',
  'Times Italic': '/System/Library/Fonts/Times.dfont',
  'Times New Roman Bold': '/Library/Fonts/Times New Roman Bold.ttf',
  'Times New Roman Bold Italic': '/Library/Fonts/Times New Roman Bold Italic.ttf',
  'Times New Roman Italic': '/Library/Fonts/Times New Roman Italic.ttf',
  'Times New Roman Regular': '/Library/Fonts/Times New Roman.ttf',
  'Times Regular': '/System/Library/Fonts/Times.dfont',
  'Trebuchet MS Bold': '/Library/Fonts/Trebuchet MS Bold.ttf',
  'Trebuchet MS Bold Italic': '/Library/Fonts/Trebuchet MS Bold Italic.ttf',
  'Trebuchet MS Italic': '/Library/Fonts/Trebuchet MS Italic.ttf',
  'Trebuchet MS Regular': '/Library/Fonts/Trebuchet MS.ttf',
  'Utopia Bold': '/usr/X11R6/lib/X11/fonts/Type1/UTB_____.pfa',
  'Utopia Bold Italic': '/usr/X11R6/lib/X11/fonts/Type1/UTBI____.pfa',
  'Utopia Italic': '/usr/X11R6/lib/X11/fonts/Type1/UTI_____.pfa',
  'Utopia Regular': '/usr/X11R6/lib/X11/fonts/Type1/UTRG____.pfa',
  'Verdana Bold': '/Library/Fonts/Verdana Bold.ttf',
  'Verdana Bold Italic': '/Library/Fonts/Verdana Bold Italic.ttf',
  'Verdana Italic': '/Library/Fonts/Verdana Italic.ttf',
  'Verdana Regular': '/Library/Fonts/Verdana.ttf',
  'Webdings Regular': '/Library/Fonts/Webdings.ttf',
  'Wingdings 2 Regular': '/Library/Fonts/Wingdings 2.ttf',
  'Wingdings 3 Regular': '/Library/Fonts/Wingdings 3.ttf',
  'Wingdings Regular': '/Library/Fonts/Wingdings.ttf',
  'Yuppy SC Regular': '/Library/Fonts/雅痞-简.otf',
  'Yuppy TC Regular': '/Library/Fonts/雅痞-繁.otf',
  'Zapf Dingbats Regular': '/System/Library/Fonts/ZapfDingbats.ttf',
  'Zapfino Regular': '/Library/Fonts/Zapfino.ttf' }

@strk
Copy link
Contributor

strk commented Nov 27, 2013

Due to unwanted side-effects of the resolution we found for having mapnik validate fonts (using "strict" mode, which also complains about missing point-file, CartoDB/Windshaft-cartodb#93) I'm back here considering validation to take place in CartoCSS.

@strk
Copy link
Contributor

strk commented Nov 28, 2013

So, would a pull request for carto to expose an interface taking a list of valid font names to check against for validation be accepted ?

@strk
Copy link
Contributor

strk commented Nov 28, 2013

It actually looks like there is already support for adding validation_data.fonts in the "env" variable ! Nice!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants