From e81d7afe6e0e9dd26025f3243a11cf0b408a8046 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 4 Oct 2010 18:18:48 -0400 Subject: [PATCH] Add hb_face_get_upem() --- src/hb-font.cc | 6 ++++++ src/hb-font.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/hb-font.cc b/src/hb-font.cc index fd5df93..223b2b4 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -397,6 +397,12 @@ hb_face_get_table (hb_face_t *face, return blob; } +unsigned int +hb_face_get_upem (hb_face_t *face) +{ + return (face->head_table ? face->head_table : &Null(head))->get_upem (); +} + /* * hb_font_t diff --git a/src/hb-font.h b/src/hb-font.h index 7815985..934f17c 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -78,6 +78,9 @@ hb_blob_t * hb_face_get_table (hb_face_t *face, hb_tag_t tag); +unsigned int +hb_face_get_upem (hb_face_t *face); + /* * hb_font_funcs_t -- 2.7.4