diff options
| author | Eli Zaretskii | 2020-11-19 22:06:23 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2020-11-19 22:06:23 +0200 |
| commit | f641ef1a0712d5ca1a9a6dc39d4f0846b11bc26b (patch) | |
| tree | 6911e71f8747babe00a15d0643ad5c53f244b49e | |
| parent | 9d02e6c5ff2a8af78ca8a2c934970f8a46dcef55 (diff) | |
| download | emacs-f641ef1a0712d5ca1a9a6dc39d4f0846b11bc26b.tar.gz emacs-f641ef1a0712d5ca1a9a6dc39d4f0846b11bc26b.zip | |
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.
| -rw-r--r-- | doc/lispref/display.texi | 14 | ||||
| -rw-r--r-- | src/font.c | 17 |
2 files changed, 31 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index be2de000c35..39cc270a5fd 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3734,6 +3734,20 @@ Additional typographic style information for the font, such as | |||
| 3734 | The charset registry and encoding of the font, such as | 3734 | The charset registry and encoding of the font, such as |
| 3735 | @samp{iso8859-1}. The value should be a string or a symbol. | 3735 | @samp{iso8859-1}. The value should be a string or a symbol. |
| 3736 | 3736 | ||
| 3737 | @item :dpi | ||
| 3738 | The resolution in dots per inch for which the font is designed. The | ||
| 3739 | value must be a non-negative number. | ||
| 3740 | |||
| 3741 | @item :spacing | ||
| 3742 | The spacing of the font: proportional, dual, mono, or charcell. The | ||
| 3743 | value should be either an integer (0 for proportional, 90 for dual, | ||
| 3744 | 100 for mono, 110 for charcell) or a one-letter symbol (one of | ||
| 3745 | @code{P}, @code{D}, @code{M}, or @code{C}). | ||
| 3746 | |||
| 3747 | @item :avgwidth | ||
| 3748 | The average width of the font in 1/10 pixel units. The value should | ||
| 3749 | be a non-negative number. | ||
| 3750 | |||
| 3737 | @item :script | 3751 | @item :script |
| 3738 | The script that the font must support (a symbol). | 3752 | The script that the font must support (a symbol). |
| 3739 | 3753 | ||
diff --git a/src/font.c b/src/font.c index 39ec1b3562a..b71eae6c319 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 | |||
| 3934 | specifying the font size. It specifies the font size in pixels (if | 3934 | specifying the font size. It specifies the font size in pixels (if |
| 3935 | VALUE is an integer), or in points (if VALUE is a float). | 3935 | VALUE is an integer), or in points (if VALUE is a float). |
| 3936 | 3936 | ||
| 3937 | `:dpi' | ||
| 3938 | |||
| 3939 | VALUE must be a non-negative number that specifies the resolution | ||
| 3940 | (dot per inch) for which the font is designed. | ||
| 3941 | |||
| 3942 | `:spacing' | ||
| 3943 | |||
| 3944 | VALUE specifies the spacing of the font: mono, proportional, charcell, | ||
| 3945 | or dual. It can be either a number (0 for proportional, 90 for dual, | ||
| 3946 | 100 for mono, 110 for charcell) or a 1-letter symbol: `P', `D', `M', | ||
| 3947 | or `C' (lower-case variants are also accepted). | ||
| 3948 | |||
| 3949 | `:avgwidth' | ||
| 3950 | |||
| 3951 | VALUE must be a non-negative integer specifying the average width of | ||
| 3952 | the font in 1/10 pixel units. | ||
| 3953 | |||
| 3937 | `:name' | 3954 | `:name' |
| 3938 | 3955 | ||
| 3939 | VALUE must be a string of XLFD-style or fontconfig-style font name. | 3956 | VALUE must be a string of XLFD-style or fontconfig-style font name. |