[pango/pangowin32-more-harfbuzz: 2/3] PangoWin32: Move two private functions
- From: Khaled Hosny <khaledh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pangowin32-more-harfbuzz: 2/3] PangoWin32: Move two private functions
- Date: Thu, 25 Jul 2019 21:07:04 +0000 (UTC)
commit 743a2e76cdf6b7f969d03f228375b07700af923f
Author: Khaled Hosny <khaledhosny eglug org>
Date: Thu Jul 25 23:06:02 2019 +0200
PangoWin32: Move two private functions
Move to their last use site.
pango/pangowin32-fontmap.c | 32 ++++++++++++++++++++++++++++++++
pango/pangowin32-private.h | 8 --------
pango/pangowin32.c | 32 --------------------------------
3 files changed, 32 insertions(+), 40 deletions(-)
---
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index a0347931..1c0b70f2 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -1111,6 +1111,38 @@ pango_win32_font_map_real_find_font (PangoWin32FontMap *win32fontmap,
return (PangoFont *)win32font;
}
+static gboolean
+_pango_win32_get_name_header (HDC hdc,
+ struct name_header *header)
+{
+ if (GetFontData (hdc, NAME, 0, header, sizeof (*header)) != sizeof (*header))
+ return FALSE;
+
+ header->num_records = GUINT16_FROM_BE (header->num_records);
+ header->string_storage_offset = GUINT16_FROM_BE (header->string_storage_offset);
+
+ return TRUE;
+}
+
+static gboolean
+_pango_win32_get_name_record (HDC hdc,
+ gint i,
+ struct name_record *record)
+{
+ if (GetFontData (hdc, NAME, 6 + i * sizeof (*record),
+ record, sizeof (*record)) != sizeof (*record))
+ return FALSE;
+
+ record->platform_id = GUINT16_FROM_BE (record->platform_id);
+ record->encoding_id = GUINT16_FROM_BE (record->encoding_id);
+ record->language_id = GUINT16_FROM_BE (record->language_id);
+ record->name_id = GUINT16_FROM_BE (record->name_id);
+ record->string_length = GUINT16_FROM_BE (record->string_length);
+ record->string_offset = GUINT16_FROM_BE (record->string_offset);
+
+ return TRUE;
+}
+
static gchar *
get_family_nameA (const LOGFONTA *lfp)
{
diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h
index 7a02f189..9d9a0a73 100644
--- a/pango/pangowin32-private.h
+++ b/pango/pangowin32-private.h
@@ -268,14 +268,6 @@ _PANGO_EXTERN
void _pango_win32_fontmap_cache_remove (PangoFontMap *fontmap,
PangoWin32Font *xfont);
-_PANGO_EXTERN
-gboolean _pango_win32_get_name_header (HDC hdc,
- struct name_header *header);
-_PANGO_EXTERN
-gboolean _pango_win32_get_name_record (HDC hdc,
- gint i,
- struct name_record *record);
-
_PANGO_EXTERN
HFONT _pango_win32_font_get_hfont (PangoFont *font);
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 7eedeeca..30d84be2 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -1191,38 +1191,6 @@ pango_win32_font_get_glyph_index (PangoFont *font,
return glyph;
}
-gboolean
-_pango_win32_get_name_header (HDC hdc,
- struct name_header *header)
-{
- if (GetFontData (hdc, NAME, 0, header, sizeof (*header)) != sizeof (*header))
- return FALSE;
-
- header->num_records = GUINT16_FROM_BE (header->num_records);
- header->string_storage_offset = GUINT16_FROM_BE (header->string_storage_offset);
-
- return TRUE;
-}
-
-gboolean
-_pango_win32_get_name_record (HDC hdc,
- gint i,
- struct name_record *record)
-{
- if (GetFontData (hdc, NAME, 6 + i * sizeof (*record),
- record, sizeof (*record)) != sizeof (*record))
- return FALSE;
-
- record->platform_id = GUINT16_FROM_BE (record->platform_id);
- record->encoding_id = GUINT16_FROM_BE (record->encoding_id);
- record->language_id = GUINT16_FROM_BE (record->language_id);
- record->name_id = GUINT16_FROM_BE (record->name_id);
- record->string_length = GUINT16_FROM_BE (record->string_length);
- record->string_offset = GUINT16_FROM_BE (record->string_offset);
-
- return TRUE;
-}
-
/*
* Swap HarfBuzz-style tags to tags that GetFontData() understands,
* adapted from https://github.com/harfbuzz/harfbuzz/pull/1832,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]