[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 f641ef1: Improve documentation of 'font-spec'
From: |
Eli Zaretskii |
Subject: |
emacs-27 f641ef1: Improve documentation of 'font-spec' |
Date: |
Thu, 19 Nov 2020 15:07:29 -0500 (EST) |
branch: emacs-27
commit f641ef1a0712d5ca1a9a6dc39d4f0846b11bc26b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Improve documentation of 'font-spec'
* doc/lispref/display.texi (Low-Level Font):
* src/font.c (Ffont_spec): Document 'font-spec' keys that are
supported, but were undocumented.
---
doc/lispref/display.texi | 14 ++++++++++++++
src/font.c | 17 +++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index be2de00..39cc270 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3734,6 +3734,20 @@ Additional typographic style information for the font,
such as
The charset registry and encoding of the font, such as
@samp{iso8859-1}. The value should be a string or a symbol.
+@item :dpi
+The resolution in dots per inch for which the font is designed. The
+value must be a non-negative number.
+
+@item :spacing
+The spacing of the font: proportional, dual, mono, or charcell. The
+value should be either an integer (0 for proportional, 90 for dual,
+100 for mono, 110 for charcell) or a one-letter symbol (one of
+@code{P}, @code{D}, @code{M}, or @code{C}).
+
+@item :avgwidth
+The average width of the font in 1/10 pixel units. The value should
+be a non-negative number.
+
@item :script
The script that the font must support (a symbol).
diff --git a/src/font.c b/src/font.c
index 39ec1b3..b71eae6 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3934,6 +3934,23 @@ VALUE must be a non-negative integer or a floating point
number
specifying the font size. It specifies the font size in pixels (if
VALUE is an integer), or in points (if VALUE is a float).
+`:dpi'
+
+VALUE must be a non-negative number that specifies the resolution
+(dot per inch) for which the font is designed.
+
+`:spacing'
+
+VALUE specifies the spacing of the font: mono, proportional, charcell,
+or dual. It can be either a number (0 for proportional, 90 for dual,
+100 for mono, 110 for charcell) or a 1-letter symbol: `P', `D', `M',
+or `C' (lower-case variants are also accepted).
+
+`:avgwidth'
+
+VALUE must be a non-negative integer specifying the average width of
+the font in 1/10 pixel units.
+
`:name'
VALUE must be a string of XLFD-style or fontconfig-style font name.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 f641ef1: Improve documentation of 'font-spec',
Eli Zaretskii <=