[HarfBuzz] harfbuzz-ng: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Jun 8 11:42:15 PDT 2012
src/hb-uniscribe.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 872969126756456a69bf958f3df6e56a26e57b0a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jun 8 14:18:30 2012 -0400
Increase Uniscribe MAX_ITEMS
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 17d0acc..b71b00a 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -295,7 +295,7 @@ retry:
ALLOCATE_ARRAY (uint32_t, vis_clusters, glyphs_size);
-#define MAX_ITEMS 10
+#define MAX_ITEMS 256
SCRIPT_ITEM items[MAX_ITEMS + 1];
SCRIPT_CONTROL bidi_control = {0};
commit dbffa4c83d29c689ee4cd8a1c53e84521028c711
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jun 8 14:08:32 2012 -0400
Fix Uniscribe charset matching
Previously was failing to match fonts that didn't support CHARSET_ANSI.
There still remains a problem with the Uniscribe backend, in that if a
font with the same family name is installed, and is newer, the native
one is preferred over the font we provide. Fixing it requires rewriting
the name table with a unique family name...
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 42721ec..17d0acc 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -64,6 +64,7 @@ populate_log_font (LOGFONTW *lf,
{
memset (lf, 0, sizeof (*lf));
lf->lfHeight = -font->y_scale;
+ lf->lfCharSet = DEFAULT_CHARSET;
hb_blob_t *blob = Sanitizer<name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
const name *name_table = Sanitizer<name>::lock_instance (blob);
commit 82e8bd8628aeb37835fb019a71b6bdac87824b97
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jun 8 11:48:29 2012 -0400
Remove unused code
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 485e084..42721ec 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -60,11 +60,9 @@ DWORD GetFontData(
static bool
populate_log_font (LOGFONTW *lf,
- HDC hdc,
hb_font_t *font)
{
memset (lf, 0, sizeof (*lf));
- int dpi = GetDeviceCaps (hdc, LOGPIXELSY);
lf->lfHeight = -font->y_scale;
hb_blob_t *blob = Sanitizer<name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
@@ -178,7 +176,7 @@ _hb_uniscribe_font_get_data (hb_font_t *font)
data->hdc = GetDC (NULL);
- if (unlikely (!populate_log_font (&data->log_font, data->hdc, font)))
+ if (unlikely (!populate_log_font (&data->log_font, font)))
DEBUG_MSG (UNISCRIBE, font, "Font populate_log_font() failed");
else {
data->hfont = CreateFontIndirectW (&data->log_font);
More information about the HarfBuzz
mailing list