]> code.delx.au - gnu-emacs/commitdiff
Improve documentation of ':lang' in font specs
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Jun 2015 10:23:42 +0000 (13:23 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Jun 2015 10:23:42 +0000 (13:23 +0300)
* src/font.c (Ffont_spec): Doc fix: elaborate on the values and
use of the ':lang' property of the font spec.
* doc/emacs/frames.texi (Fonts): Document the language names that
can be in the STYLE part of XLFD.
* doc/lispref/display.texi (Low-Level Font): Document the ':lang'
property.

doc/emacs/frames.texi
doc/lispref/display.texi
src/font.c

index f401c8f645f657330e1c856abd13bd47ccab1142..de72d87cf48303848a97d8b9f34f3ac7e5301e06 100644 (file)
@@ -703,7 +703,10 @@ The font width---normally @samp{normal}, @samp{condensed},
 other values.
 @item style
 An optional additional style name.  Usually it is empty---most XLFDs
-have two hyphens in a row at this point.
+have two hyphens in a row at this point.  The style name can also
+specify a two-letter ISO-639 language name, like @samp{ja} or
+@samp{ko}; some fonts that support CJK scripts have that spelled out
+in the style name part.
 @item pixels
 The font height, in pixels.
 @item height
index 357a3c33fa33b923e28a8067cab78c235330eca6..b4e20371f35519c1cb4e14c1bbccbee373d71a00 100644 (file)
@@ -3419,6 +3419,15 @@ The charset registry and encoding of the font, such as
 @item :script
 The script that the font must support (a symbol).
 
+@item :lang
+The language that the font should support.  The value should be a
+symbol whose name is a two-letter ISO-639 language name.  On X, the
+value is matched against the ``Additional Style'' field of the XLFD
+name of a font, if it is non-empty.  On MS-Windows, fonts matching the
+spec are required to support codepages needed for the language.
+Currently, only a small set of CJK languages is supported with this
+property: @samp{ja}, @samp{ko}, and @samp{zh}.
+
 @item :otf
 @cindex OpenType font
 The font must be an OpenType font that supports these OpenType
index 7aa0e8537ce076ebcea8aaf17b845b3c5d5a6f93..564c53ae54e8b43719b19d2bf1f8c88141382c92 100644 (file)
@@ -3857,8 +3857,10 @@ listed in the variable `script-representative-chars'.
 
 `:lang'
 
-VALUE must be a symbol of two-letter ISO-639 language names,
-e.g. `ja'.
+VALUE must be a symbol whose name is a two-letter ISO-639 language
+name, e.g. `ja'.  The value is matched against the "Additional Style"
+field of the XLFD spec of a font, if it's non-empty, on X, and
+against the codepages supported by the font on w32.
 
 `:otf'