[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 12/13: Handle fonts with multiple-of-8 bbox width
From: |
Samuel Thibault |
Subject: |
[hurd] 12/13: Handle fonts with multiple-of-8 bbox width |
Date: |
Wed, 26 Mar 2014 12:12:15 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 64b5d358fcaa039ca2e7634aceaa5ed4c3a10cc4
Author: Samuel Thibault <address@hidden>
Date: Wed Mar 26 04:09:39 2014 +0100
Handle fonts with multiple-of-8 bbox width
* console-client/vga-dynafont.c (dynafont_new): When the bbox width of
the font is a multiple of 8, set width to 8. Reject any other value
than 8 or 9 with EINVAL.
---
console-client/vga-dynafont.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/console-client/vga-dynafont.c b/console-client/vga-dynafont.c
index 5e3bc6d..573d63b 100644
--- a/console-client/vga-dynafont.c
+++ b/console-client/vga-dynafont.c
@@ -480,6 +480,12 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic,
bdf_font_t font_bold,
font = create_system_font ();
if (!font || !font->bbox.height)
return errno;
+ if (!width)
+ width = font->bbox.width;
+ if ((width % 8) == 0)
+ width = 8;
+ if (width != 8 && width != 9)
+ return EINVAL;
df = malloc (sizeof *df);
if (!df)
@@ -494,8 +500,6 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic,
bdf_font_t font_bold,
df->font_bold = font_bold;
df->font_bold_italic = font_bold_italic;
df->size = size;
- if (!width)
- width = df->font->bbox.width;
df->width = width;
df->cursor_standout = 0;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (bbb6465 -> d8b7d42), Samuel Thibault, 2014/03/26
- [hurd] 10/13: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/03/26
- [hurd] 05/13: hurd: fix receiver type, honor DEFAULT_PAGER_IMPORTS, Samuel Thibault, 2014/03/26
- [hurd] 07/13: mach-defpager: fix local includes, Samuel Thibault, 2014/03/26
- [hurd] 12/13: Handle fonts with multiple-of-8 bbox width,
Samuel Thibault <=
- [hurd] 01/13: libpager: fix comment of pager_change_attributes, Samuel Thibault, 2014/03/26
- [hurd] 13/13: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/03/26
- [hurd] 11/13: Fix setting LGE flag, Samuel Thibault, 2014/03/26
- [hurd] 09/13: Align VGA buffers, Samuel Thibault, 2014/03/26
- [hurd] 08/13: mach-defpager: replace the magic typecast with a hash table, Samuel Thibault, 2014/03/26
- [hurd] 03/13: isofs: also copy the terminating zero in read_symlink_hook, Samuel Thibault, 2014/03/26
- [hurd] 06/13: mach-defpager: fix receiver lookups, Samuel Thibault, 2014/03/26
- [hurd] 04/13: libdiskfs: fix string termination, Samuel Thibault, 2014/03/26
- [hurd] 02/13: libpager: fix potential deadlock, Samuel Thibault, 2014/03/26