Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(831)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-font.cc

Issue 1143213003: Add hb-ot-font.cc and hb-ot-font.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch PR to a landed commit Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz-ng/harfbuzz.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright © 2011,2014 Google, Inc. 2 * Copyright © 2011,2014 Google, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return font->em_scale_x (ot_font->h_metrics.get_advance (glyph)); 212 return font->em_scale_x (ot_font->h_metrics.get_advance (glyph));
213 } 213 }
214 214
215 static hb_position_t 215 static hb_position_t
216 hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED, 216 hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
217 void *font_data, 217 void *font_data,
218 hb_codepoint_t glyph, 218 hb_codepoint_t glyph,
219 void *user_data HB_UNUSED) 219 void *user_data HB_UNUSED)
220 { 220 {
221 const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; 221 const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
222 return font->em_scale_y (-ot_font->v_metrics.get_advance (glyph)); 222 return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph));
223 } 223 }
224 224
225 static hb_bool_t 225 static hb_bool_t
226 hb_ot_get_glyph_h_origin (hb_font_t *font HB_UNUSED, 226 hb_ot_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
227 void *font_data HB_UNUSED, 227 void *font_data HB_UNUSED,
228 hb_codepoint_t glyph HB_UNUSED, 228 hb_codepoint_t glyph HB_UNUSED,
229 hb_position_t *x HB_UNUSED, 229 hb_position_t *x HB_UNUSED,
230 hb_position_t *y HB_UNUSED, 230 hb_position_t *y HB_UNUSED,
231 void *user_data HB_UNUSED) 231 void *user_data HB_UNUSED)
232 { 232 {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 { 339 {
340 hb_ot_font_t *ot_font = _hb_ot_font_create (font); 340 hb_ot_font_t *ot_font = _hb_ot_font_create (font);
341 if (unlikely (!ot_font)) 341 if (unlikely (!ot_font))
342 return; 342 return;
343 343
344 hb_font_set_funcs (font, 344 hb_font_set_funcs (font,
345 _hb_ot_get_font_funcs (), 345 _hb_ot_get_font_funcs (),
346 ot_font, 346 ot_font,
347 (hb_destroy_func_t) _hb_ot_font_destroy); 347 (hb_destroy_func_t) _hb_ot_font_destroy);
348 } 348 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/harfbuzz.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698