summaryrefslogtreecommitdiff
path: root/src/bitmap
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-21 13:37:00 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-23 17:21:57 -0700
commit783a406d6258509abfbdc54c0b32366dcaf13044 (patch)
treea7eac2a7f761a5da08e0391138a4c1e1ac2d232f /src/bitmap
parente8d20171fe04dbdc5f97739d5a59e02f0b091ba0 (diff)
Use default glyphs when getting 16-bit font with 8-bit text
When accessing a 16-bit font with firstRow > 0 with 8-bit text, check to see if the font has a default character and return that for every incoming character. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/bitmap')
-rw-r--r--src/bitmap/bitmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bitmap/bitmap.c b/src/bitmap/bitmap.c
index 9b20faf..0a379eb 100644
--- a/src/bitmap/bitmap.c
+++ b/src/bitmap/bitmap.c
@@ -63,8 +63,12 @@ bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
case Linear8Bit:
case TwoD8Bit:
- if (pFont->info.firstRow > 0)
+ if (pFont->info.firstRow > 0) {
+ if (pDefault)
+ while (count--)
+ *glyphs++ = pDefault;
break;
+ }
if (pFont->info.allExist && pDefault) {
while (count--) {
c = (*chars++) - firstCol;