From: Keith Packard Date: Tue, 1 Mar 2005 20:36:48 +0000 (+0000) Subject: Generate and install PDF versions of the manuals X-Git-Tag: fc-2_3_0~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0c009d2b6df523bba7a10ad148287bed2df9ebd6;p=fontconfig.git Generate and install PDF versions of the manuals Fix formatting Add missing exported functions, fix data types Add missing pattern elements. Add missing pattern elements. Document conf.d usage, clarify available orthography list. Fix some config file attributes. Complete list of constants. Mark FC_SOURCE deprecated. Don't set FC_SOURCE any longer. --- diff --git a/ChangeLog b/ChangeLog index 5447b40..c1c9059 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2005-03-01 Keith Packard + + * doc/Makefile.am: + Generate and install PDF versions of the manuals + + * doc/fcpattern.fncs: + Fix formatting + + * doc/fcstring.fncs: + Add missing exported functions, fix data types + + * doc/fontconfig-devel.sgml: + Add missing pattern elements. + + * doc/fontconfig-user.sgml: + Add missing pattern elements. Document conf.d usage, + clarify available orthography list. Fix some config file + attributes. Complete list of constants. + + * fontconfig/fontconfig.h: + Mark FC_SOURCE deprecated. + + * src/fcfreetype.c: (FcFreeTypeQuery): + Don't set FC_SOURCE any longer. + 2005-02-28 Keith Packard * Makefile.am: diff --git a/doc/Makefile.am b/doc/Makefile.am index f2ae0ba..622de9b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -30,8 +30,10 @@ DOC_MODULE = fontconfig DOC2HTML = docbook2html DOC2TXT = docbook2txt DOC2MAN = docbook2man +DOC2PDF = docbook2pdf TXT = fontconfig-user.txt fontconfig-devel.txt +PDF = fontconfig-user.pdf fontconfig-devel.pdf HTML_FILES = fontconfig-user.html HTML_DIR = fontconfig-devel SGML = fontconfig-user.sgml fontconfig-devel.sgml @@ -80,7 +82,7 @@ edit_sgml_SOURCES=edit-sgml.c docdir=@DOCDIR@ -DOC_FILES=$(TXT) $(HTML_FILES) +DOC_FILES=$(TXT) $(PDF) $(HTML_FILES) LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/* EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in @@ -97,6 +99,10 @@ if USEDOCBOOK $(RM) $@ $(DOC2TXT) $< +.sgml.pdf: + $(RM) $@ + $(DOC2PDF) $< + $(man_MANS): func.refs func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml @@ -133,6 +139,11 @@ fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml $(DOC2TXT) local-fontconfig-devel.sgml mv local-fontconfig-devel.txt $@ +fontconfig-devel.pdf: local-fontconfig-devel.sgml version.sgml confdir.sgml + $(RM) $@ + $(DOC2PDF) local-fontconfig-devel.sgml + mv local-fontconfig-devel.pdf $@ + fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml $(RM) $@ local-$@ $@.tmp $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp @@ -145,6 +156,11 @@ fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml $(DOC2TXT) local-fontconfig-user.sgml mv local-fontconfig-user.txt $@ +fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml + $(RM) $@ + $(DOC2PDF) local-fontconfig-user.sgml + mv local-fontconfig-user.pdf $@ + STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }' confdir.sgml: ${DOC_SRC}/confdir.sgml.in sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml diff --git a/doc/fcpattern.fncs b/doc/fcpattern.fncs index 0cfc499..9a2e405 100644 --- a/doc/fcpattern.fncs +++ b/doc/fcpattern.fncs @@ -150,7 +150,8 @@ any existing list of values. @TYPE4@ FcValue * @ARG4@ v @PURPOSE@ Return a value from a pattern @DESC@ -Returns in `v the `idth value associated with the property `object'. +Returns in v the id'th value +associated with the property object. The value returned is not a copy, but rather refers to the data stored within the pattern directly. Applications must not free this value. @@ diff --git a/doc/fcstring.fncs b/doc/fcstring.fncs index 3fbf75e..b3adc43 100644 --- a/doc/fcstring.fncs +++ b/doc/fcstring.fncs @@ -107,6 +107,15 @@ buffer. Yes, this is strdup, but that function isn't available on every platform. @@ +@RET@ FcChar8 * +@FUNC@ FcStrDowncase +@TYPE1@ const FcChar8 * @ARG1@ s +@PURPOSE@ create a lower case translation of a string +@DESC@ +Allocates memory, copies s, converting upper case +letters to lower case and returns the allocated buffer. +@@ + @RET@ FcChar8 * @FUNC@ FcStrCopyFilename @TYPE1@ const FcChar8 * @ARG1@ s @@ -119,8 +128,8 @@ Returns NULL if '~' is present in s and HOME is unset. @RET@ int @FUNC@ FcStrCmpIgnoreCase -@TYPE1@ const char * @ARG1@ s1 -@TYPE2@ const char * @ARG2@ s2 +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 @PURPOSE@ compare UTF-8 strings ignoring ASCII case @DESC@ Returns the usual <0, 0, >0 result of comparing @@ -129,6 +138,33 @@ case-insensitive in the ASCII range and will operate properly with UTF8 encoded strings, although it does not check for well formed strings. @@ +@RET@ FcChar8 * +@FUNC@ FcStrStr +@TYPE1@ const char * @ARG1@ s1 +@TYPE2@ const char * @ARG2@ s2 +@PURPOSE@ locate UTF-8 substring +@DESC@ +Returns the location of s2 in +s1. Returns NULL if s2 +is not present in s1. This test will operate properly +with UTF8 encoded strings, although it does not check for well formed +strings. +@@ + +@RET@ FcChar8 * +@FUNC@ FcStrStrIgnoreCase +@TYPE1@ const char * @ARG1@ s1 +@TYPE2@ const char * @ARG2@ s2 +@PURPOSE@ locate UTF-8 substring ignoring ASCII case +@DESC@ +Returns the location of s2 in +s1, ignoring ASCII case. Returns NULL if +s2 is not present in s1. +This test is case-insensitive in the ASCII range and will operate properly +with UTF8 encoded strings, although it does not check for well formed +strings. +@@ + @RET@ FcChar8 * @FUNC@ FcStrDirname @TYPE1@ const FcChar8 * @ARG1@ file diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index 8b60cd6..5bad9a5 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -138,13 +138,14 @@ convenience for the applications rendering mechanism. each style name fullname FC_FULLNAME String Font face full name where different from family and - family + style + family + style fullnamelang FC_FULLNAMELANG String Language cooresponding to each fullname slant FC_SLANT Int Italic, oblique or roman weight FC_WEIGHT Int Light, medium, demibold, bold or black size FC_SIZE Double Point size + width FC_WIDTH Int Condensed, normal or expanded aspect FC_ASPECT Double Stretches glyphs horizontally before hinting pixelsize FC_PIXEL_SIZE Double Pixel size @@ -155,6 +156,7 @@ convenience for the applications rendering mechanism. antialiased hinting FC_HINTING Bool Whether the rasterizer should use hinting + hintstyle FC_HINT_STYLE Int Automatic hinting style verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout autohint FC_AUTOHINT Bool Use autohinter instead of normal hinter @@ -178,6 +180,11 @@ convenience for the applications rendering mechanism. the font lang FC_LANG String List of RFC-3066-style languages this font supports + fontversion FC_FONTVERSION Int Version number of the font + capability FC_CAPABILITY String List of layout capabilities in + the font + embolden FC_EMBOLDEN Bool Rasterizer should + synthetically embolden the font @@ -365,6 +372,7 @@ Used as a return type for functions manipulating FcPattern objects. FcResultTypeMismatch Object exists, but the type doesn't match FcResultNoId Object exists, but has fewer values than specified + FcResultOutOfMemory Malloc failed diff --git a/doc/fontconfig-user.sgml b/doc/fontconfig-user.sgml index 5fefb40..11a13e2 100644 --- a/doc/fontconfig-user.sgml +++ b/doc/fontconfig-user.sgml @@ -38,6 +38,7 @@ &confdir;/fonts.conf &confdir;/fonts.dtd + &confdir;/conf.d ~/.fonts.conf @@ -100,12 +101,14 @@ convenience for the applications rendering mechanism. 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 @@ -123,6 +126,9 @@ convenience for the applications rendering mechanism. 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 @@ -216,14 +222,19 @@ Here are some examples: Each font in the database contains a list of languages it supports. This is computed by comparing the Unicode coverage of the font with the orthography of each language. Languages are tagged using an RFC-3066 compatible naming -and occur in two parts -- the ISO639 language tag followed a hyphen and then +and occur in two parts -- the ISO 639 language tag followed a hyphen and then by the ISO 3166 country code. The hyphen and country code may be elided. Fontconfig has orthographies for several languages built into the library. No provision has been made for adding new ones aside from rebuilding the library. It currently supports 122 of the 139 languages named in ISO 639-1, 141 of the languages with two-letter codes from ISO 639-2 and another 30 -languages with only three-letter codes. +languages with only three-letter codes. Languages with both two and three +letter codes are provided with only the two letter code. + +For languages used in multiple territories with radically different +character sets, fontconfig includes per-territory orthographies. This +includes Azerbaijani, Kurdish, Pashto, Tigrinya and Chinese. Configuration File Format @@ -336,14 +347,17 @@ tests are subjected to all the edits. If 'target' is set to "font" instead of the default "pattern", then this element applies to the font name resulting from a match rather than a font pattern to be matched. - <sgmltag>test qual="any" name="property" compare="eq"</> -This element contains a single value which is compared with the pattern -property "property" (substitute any of the property names seen + <sgmltag>test qual="any" name="property" target="default" compare="eq"</> +This element contains a single value which is compared with the target +('pattern', 'font' or 'default') property "property" (substitute any of the property names seen above). 'compare' can be one of "eq", "not_eq", "less", "less_eq", "more", or "more_eq". 'qual' may either be the default, "any", in which case the match succeeds if any value associated with the property matches the test value, or "all", in which case all of the values associated with the property must -match the test value. +match the test value. When used in a <match target="font"> element, +the target= attribute in the <test> element selects between matching +the original pattern or the font. "default" selects whichever target the +outer <match> element has selected. <sgmltag>edit name="property" mode="assign" binding="weak"</> This element contains a list of expression elements (any of the value or @@ -351,7 +365,9 @@ operator elements). The expression elements are evaluated at run-time and modify the property "property". The modification depends on whether "property" was matched by one of the associated test elements, if so, the modification may affect the first matched value. Any values inserted into -the property are given the indicated binding. 'mode' is one of: +the property are given the indicated binding ("strong", "weak" or "same") +with "same" binding using the value from the matched pattern element. +'mode' is one of: Mode With Match Without Match --------------------------------------------------------------------- @@ -385,14 +401,32 @@ symbolic names for common font values: Constant Property Value ------------------------------------- - light weight 0 + thin weight 0 + extralight weight 40 + ultralight weight 40 + light weight 50 + book weight 75 + regular weight 80 + normal weight 80 medium weight 100 demibold weight 180 + semibold weight 180 bold weight 200 + extrabold weight 205 black weight 210 + heavy weight 210 roman slant 0 italic slant 100 oblique slant 110 + ultracondensed width 50 + extracondensed width 63 + condensed width 75 + semicondensed width 87 + normal width 100 + semiexpanded width 113 + expanded width 125 + extraexpanded width 150 + ultraexpanded width 200 proportional spacing 0 dual spacing 90 mono spacing 100 @@ -403,6 +437,10 @@ symbolic names for common font values: vrgb rgba 3 vbgr rgba 4 none rgba 5 + hintnone hintstyle 0 + hintslight hintstyle 1 + hintmedium hintstyle 2 + hintfull hintstyle 3 @@ -483,6 +521,13 @@ This is an example of a system-wide configuration file --> <include ignore_missing="yes">~/.fonts.conf</include> +<!-- + Load local customization files, but don't complain + if there aren't any +--> +<include ignore_missing="yes">conf.d</include> +<include ignore_missing="yes">local.conf</include> + <!-- Alias well known font names to available TrueType fonts. These substitute TrueType faces for similar Type1 @@ -495,7 +540,7 @@ This is an example of a system-wide configuration file </alias> <alias> <family>Helvetica</family> - <prefer><family>Verdana</family></prefer> + <prefer><family>Arial</family></prefer> <default><family>sans</family></default> </alias> <alias> @@ -515,7 +560,7 @@ This is an example of a system-wide configuration file </alias> <alias> <family>sans</family> - <prefer><family>Verdana</family></prefer> + <prefer><family>Arial</family></prefer> </alias> <alias> <family>monospace</family> @@ -561,6 +606,15 @@ instructions on editing program specified font patterns before attempting to match the available fonts. It is in xml format. +conf.d +is the conventional name for a directory of additional configuration files +managed by external applications or the local administrator. The +filenames starting with decimal digits are sorted in lexicographic order +and used as additional configuration files. All of these files are in xml +format. The master fonts.conf file references this directory in an +<include> directive. + + fonts.dtd is a DTD that describes the format of the configuration files. diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index c470dd9..a07fb71 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -85,7 +85,7 @@ typedef int FcBool; #define FC_DPI "dpi" /* double */ #define FC_RGBA "rgba" /* Int */ #define FC_MINSPACE "minspace" /* Bool use minimum line spacing */ -#define FC_SOURCE "source" /* String (X11, freetype) */ +#define FC_SOURCE "source" /* String (deprecated) */ #define FC_CHARSET "charset" /* CharSet */ #define FC_LANG "lang" /* String RFC 3066 langs */ #define FC_FONTVERSION "fontversion" /* Int from 'head' table */ diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 543c032..2446170 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1281,9 +1281,6 @@ FcFreeTypeQuery (const FcChar8 *file, if (!FcPatternAddInteger (pat, FC_INDEX, id)) goto bail1; - if (!FcPatternAddString (pat, FC_SOURCE, (FcChar8 *) "FreeType")) - goto bail1; - #if 0 /* * don't even try this -- CJK 'monospace' fonts are really