[GRASS-dev] font path question for Linux and Windows

Glynn Clements glynn at gclements.plus.com
Wed May 2 19:55:19 EDT 2007


Michael Barton wrote:

> > New snag - fc-list :outline doesn't get resource fonts (where all the
> > useful MS fonts are).  I believe this is because these contain
> > bitmaps for some font sizes, so fc-list is seeing them as bitmap
> > fonts, not outlined.
> > 
> > What about fc-list :scalable?  Does that leave out the PCF fonts?  It
> > does get the resource fonts for me.
> 
> AFAICT, :outline, :outlined, and :scalable all produce the same list of
> fonts.

Same here.

> It would help (me at least) if there was some guide to fc-list syntax
> and options. The help is zen-like in its minimalism. Looking at the man page
> for fontconfigure isn't much help either.

The list of standard properties in the fontconfig-user HTML/TXT/PDF file:

  Property        Type    Description
  --------------------------------------------------------------
  family          String  Font family names
  familylang      String  Languages corresponding to each family
  style           String  Font style. Overrides weight and slant
  stylelang       String  Languages corresponding to each style
  fullname        String  Font full names (often includes style)
  fullnamelang    String  Languages corresponding to each fullname
  slant           Int     Italic, oblique or roman
  weight          Int     Light, medium, demibold, bold or black
  size            Double  Point size
  width           Int     Condensed, normal or expanded
  aspect          Double  Stretches glyphs horizontally before hinting
  pixelsize       Double  Pixel size
  spacing         Int     Proportional, dual-width, monospace or charcell
  foundry         String  Font foundry name
  antialias       Bool    Whether glyphs can be antialiased
  hinting         Bool    Whether the rasterizer should use hinting
  hintstyle       Int     Automatic hinting style
  verticallayout  Bool    Use vertical layout
  autohint        Bool    Use autohinter instead of normal hinter
  globaladvance   Bool    Use font global advance data
  file            String  The filename holding the font
  index           Int     The index of the font within the file
  ftface          FT_Face Use the specified FreeType face object
  rasterizer      String  Which rasterizer is in use
  outline         Bool    Whether the glyphs are outlines
  scalable        Bool    Whether glyphs can be scaled
  scale           Double  Scale factor for point->pixel conversions
  dpi             Double  Target dots per inch
  rgba            Int     unknown, rgb, bgr, vrgb, vbgr,
                          none - subpixel geometry
  minspace        Bool    Eliminate leading from line spacing
  charset         CharSet Unicode chars encoded by the font
  lang            String  List of RFC-3066-style languages this
                          font supports
  fontversion     Int     Version number of the font
  capability      String  List of layout capabilities in the font
  embolden        Bool    Rasterizer should synthetically embolden the font

Not all of these are usable by fc-list.

> >> The updated mkftcap script should cope with multi-font files; the part
> >> which uses fc-list outputs the index, and should append it to the path
> >> if it isn't zero. I can't test this, as none of my font files have
> >> more than one font.
> >> 
> > Actually, the index from fc-list isn't useful.  All it does is return
> > the first index (0) in each file, whether or not it has multiple
> > faces.  That is, there is only one entry per font file, which makes
> > sense, since it's listing font files and that's all we really want at
> > this stage.
> > 
> > The face index should be left to the user to find out, with some sort
> > of d.freetype.info command, which could use the FT library to get
> > font info in C.  It should return index and face name, so the user
> > would know what index to use for which style.  The output could also
> > be parsed and used by the GUI so a full list of fonts and styles
> > could be build instead of just a list of files.
> 
> So, if you DO know the font face index, how do you specify it in GRASS_FONT?

Append a vertical bar followed by the index (in decimal) to the file's
path.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list