[Fontconfig] strict check for object modification

Akira TAGOH akira at tagoh.org
Fri Aug 10 02:42:04 PDT 2012


Hi,

I just realized that modifying the object in the pattern on
target="pattern" also inherited to the pattern result of FcMatchFont.
for example, the following rule ends up to appear in the result of
FcMatchFont from FcFontMatch():

  <match target="pattern">
    <edit name="rgba" mode="assign"><const>rgb</const></edit>
  </match>

As fontconfig warns to edit the user-defined object for target="scan"
right now, I think it should warns for other cases so that that would
helps to write sane rules.
So I want to sort out what objects are allowed to edit and where the
target is it in. please let me know if something wrong and the
use-case why it needs. particularly for target="pattern". I'm listing
as is so far. it's what fontconfig is looking at the objects on
matching. and for target="scan", I put the same name to
target="pattern" because any objects not checking for target="pattern"
isn't needed to cache.

target="scan":
family
style
slant
weight
pixelsize
spacing
foundry
antialias
width
file
rasterizer
outline
charset
lang
fontversion
familylang
stylelang
fullnamelang
decorative

target="pattern":
family
style
slant
weight
pixelsize
spacing
foundry
antialias
width
file
rasterizer
outline
charset
lang
fontversion
familylang
stylelang
fullnamelang
decorative
user-defined objects

target="font":
antialias
hinting
hintstyle
verticallayout
autohint
globaladvance
rasterizer
outline
scalable
scale
dpi
rgba
minspace
embolden
embeddedbitmap
decorative
lcdfilter
charwidth
charheight
matrix
user-defined objects

Cheers,
-- 
Akira TAGOH


More information about the Fontconfig mailing list