aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-09-10 18:31:06 +0300
committerEli Zaretskii2023-09-10 18:31:06 +0300
commit3f04efe9e7d56388d29bb19c875c2004691eab4d (patch)
tree56eaf805d2924cd8ac397f074ede1f2756ec282a
parent459b5f6b6d1028217a723ad4693596edfcd0e32e (diff)
downloademacs-3f04efe9e7d56388d29bb19c875c2004691eab4d.tar.gz
emacs-3f04efe9e7d56388d29bb19c875c2004691eab4d.zip
; * src/font.h (struct font): Comment about use of average_width.
-rw-r--r--src/font.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/font.h b/src/font.h
index 492c2e58b09..aea49d6a823 100644
--- a/src/font.h
+++ b/src/font.h
@@ -298,10 +298,16 @@ struct font
298 SPACE glyph, the value is 0. */ 298 SPACE glyph, the value is 0. */
299 int space_width; 299 int space_width;
300 300
301 /* Average width of glyphs in the font. If the font itself doesn't 301 /* Average width of glyphs in the font. Should be the average width
302 have that information, but has glyphs of ASCII characters, the 302 of the glyphs of ASCII characters. The value for the default
303 value is the average width of those glyphs. Otherwise, the value 303 face's font is used to determine the canonical character width of
304 is 0. */ 304 the frame (see FRAME_COLUMN_WIDTH). For fonts that are not
305 fixed-pitch, the font backend should actually calculate the value
306 from the glyphs of ASCII characters in the range 32..126
307 inclusively; relying on the average-width attribute recorded in
308 the font is unreliable in this case, especially in fonts that
309 support CJK scripts, where many characters are wide. Value can
310 be zero if the font doesn't have glyphs for ASCII characters. */
305 int average_width; 311 int average_width;
306 312
307 /* Ascent and descent of the font (in pixels). */ 313 /* Ascent and descent of the font (in pixels). */