aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fontsrv/x11.c
AgeCommit message (Collapse)AuthorFilesLines
2018-11-13fontsrv: x11 uses FC_POSTSCRIPT_NAME (#174)Xiao-Yong1-1/+1
This makes fontsrv use the PostScript font names on X11. The PostScript font names contains only alphanumeric and hyphens. This allows us to use the Font command in acme. It also matches the font names used by fontsrv on macOS, which has been using PostScript font names.
2018-10-05fontsrv: copy some fixes from OS X to X11Fazlul Shahriar1-38/+43
* Avoid allocating empty images by adding 1 to width/height. This was crashing fontsrv. The total width of the subfont image can be zero even if the characters are present in the font. For example, all the characters in x0300.bit (part of "Combining Diacritical Marks" Unicode block) have zero width. * Make sure U+0000 is always present in the font, otherwise libdraw complains with: "stringwidth: bad character set for rune 0x0000 in ..." * Use the same fallback glyph (pjw face) as OS X. This also fixes a bug where advance was set to the total width of subfont instead of the character. Update #125 (most likely fixes the crash if in X11) Change-Id: Icdc2b641b8b0c08644569006e91cf613b4d5477f
2018-03-27fontsrv: fix some memory leaksXiao-Yong Jin1-0/+1
2015-08-27fontsrv: use 64 chars per subfont instead of 256Russ Cox1-1/+1
Makes loading faster, and makes larger sizes not too wide. Change-Id: I076c83fdb9577c1e596de45558f38ea93e3a2a31 Reviewed-on: https://plan9port-review.googlesource.com/1360 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-18fontsrv: fix x11 buildRuss Cox1-1/+0
Change-Id: I60eca10d7749ec71dc2ffbb0fbde564a1b711fa1 Reviewed-on: https://plan9port-review.googlesource.com/1180 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17fontsrv: use CoreText API on OS XRuss Cox1-12/+1
This gets us font fallback for free and avoids use of a deprecated API that might go away some day. Change-Id: I4b9b1a1ce3e6d98bfb407e3baea13f4adfe2c26a Reviewed-on: https://plan9port-review.googlesource.com/1160 Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02fontsrv: disable X11 hintingEthan Burns1-1/+1
Discussion at: https://groups.google.com/d/topic/plan9port-dev/L7RVkXPmrdY/discussion https://github.com/9fans/plan9port/pull/7 Change-Id: I4f3a6791436120388ad8798e519f5e8473dd9306 Reviewed-on: https://plan9port-review.googlesource.com/1095
2014-03-03fix gcc 4.8 warningsDavid du Colombier1-1/+1
LGTM=rsc R=rsc https://codereview.appspot.com/33240044
2012-10-21fontsrv: x11 supportYuval Pavel Zholkover1-2/+261
R=rsc, 0intro CC=plan9port.codebot http://codereview.appspot.com/6739047
2009-07-08mergeRuss Cox1-0/+2