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

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

Issue 2318273003: Roll HarfBuzz to 1.3.1 (Closed)
Patch Set: Created 4 years, 3 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/src/hb-font.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-map.cc » ('j') | 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 © 2009 Red Hat, Inc. 2 * Copyright © 2009 Red Hat, Inc.
3 * Copyright © 2009 Keith Stribley 3 * Copyright © 2009 Keith Stribley
4 * Copyright © 2015 Google, Inc. 4 * Copyright © 2015 Google, Inc.
5 * 5 *
6 * This is part of HarfBuzz, a text shaping library. 6 * This is part of HarfBuzz, a text shaping library.
7 * 7 *
8 * Permission is hereby granted, without written agreement and without 8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this 9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the 10 * software and its documentation for any purpose, provided that the
(...skipping 15 matching lines...) Expand all
26 * Red Hat Author(s): Behdad Esfahbod 26 * Red Hat Author(s): Behdad Esfahbod
27 * Google Author(s): Behdad Esfahbod 27 * Google Author(s): Behdad Esfahbod
28 */ 28 */
29 29
30 #include "hb-private.hh" 30 #include "hb-private.hh"
31 31
32 #include "hb-ft.h" 32 #include "hb-ft.h"
33 33
34 #include "hb-font-private.hh" 34 #include "hb-font-private.hh"
35 35
36 #include "hb-cache-private.hh" // Maybe use in the future?
37
36 #include FT_ADVANCES_H 38 #include FT_ADVANCES_H
37 #include FT_TRUETYPE_TABLES_H 39 #include FT_TRUETYPE_TABLES_H
38 40
39 41
40 42
41 #ifndef HB_DEBUG_FT 43 #ifndef HB_DEBUG_FT
42 #define HB_DEBUG_FT (HB_DEBUG+0) 44 #define HB_DEBUG_FT (HB_DEBUG+0)
43 #endif 45 #endif
44 46
45 47
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 hb_destroy_func_t destroy) 601 hb_destroy_func_t destroy)
600 { 602 {
601 hb_font_t *font; 603 hb_font_t *font;
602 hb_face_t *face; 604 hb_face_t *face;
603 605
604 face = hb_ft_face_create (ft_face, destroy); 606 face = hb_ft_face_create (ft_face, destroy);
605 font = hb_font_create (face); 607 font = hb_font_create (face);
606 hb_face_destroy (face); 608 hb_face_destroy (face);
607 _hb_ft_font_set_funcs (font, ft_face, false); 609 _hb_ft_font_set_funcs (font, ft_face, false);
608 hb_font_set_scale (font, 610 hb_font_set_scale (font,
609 » » (int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64 _t) ft_face->units_per_EM + (1<<15)) >> 16), 611 » » (int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64 _t) ft_face->units_per_EM + (1u<<15)) >> 16),
610 » » (int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64 _t) ft_face->units_per_EM + (1<<15)) >> 16)); 612 » » (int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64 _t) ft_face->units_per_EM + (1u<<15)) >> 16));
611 #if 0 /* hb-ft works in no-hinting model */ 613 #if 0 /* hb-ft works in no-hinting model */
612 hb_font_set_ppem (font, 614 hb_font_set_ppem (font,
613 ft_face->size->metrics.x_ppem, 615 ft_face->size->metrics.x_ppem,
614 ft_face->size->metrics.y_ppem); 616 ft_face->size->metrics.y_ppem);
615 #endif 617 #endif
616 618
617 return font; 619 return font;
618 } 620 }
619 621
620 /** 622 /**
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 0, font->y_scale < 0 ? -1 : +1}; 717 0, font->y_scale < 0 ? -1 : +1};
716 FT_Set_Transform (ft_face, &matrix, NULL); 718 FT_Set_Transform (ft_face, &matrix, NULL);
717 } 719 }
718 720
719 ft_face->generic.data = blob; 721 ft_face->generic.data = blob;
720 ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; 722 ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
721 723
722 _hb_ft_font_set_funcs (font, ft_face, true); 724 _hb_ft_font_set_funcs (font, ft_face, true);
723 hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING); 725 hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING);
724 } 726 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-font.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698