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

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

Issue 1580513002: Roll HarfBuzz to 1.1.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 4 years, 11 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-private.hh ('k') | third_party/harfbuzz-ng/src/hb-ft.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 © 2015 Google, Inc. 3 * Copyright © 2015 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 * 52 *
53 * The client is responsible to make sure that ft-face is 53 * The client is responsible to make sure that ft-face is
54 * destroyed after hb-face is destroyed. 54 * destroyed after hb-face is destroyed.
55 * 55 *
56 * Most often you don't want this function. You should use either 56 * Most often you don't want this function. You should use either
57 * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). 57 * hb_ft_face_create_cached(), or hb_ft_face_create_referenced().
58 * In particular, if you are going to pass NULL as destroy, you 58 * In particular, if you are going to pass NULL as destroy, you
59 * probably should use (the more recent) hb_ft_face_create_referenced() 59 * probably should use (the more recent) hb_ft_face_create_referenced()
60 * instead. 60 * instead.
61 */ 61 */
62 hb_face_t * 62 HB_EXTERN hb_face_t *
63 hb_ft_face_create (FT_Face ft_face, 63 hb_ft_face_create (FT_Face ft_face,
64 hb_destroy_func_t destroy); 64 hb_destroy_func_t destroy);
65 65
66 /* This version is like hb_ft_face_create(), except that it caches 66 /* This version is like hb_ft_face_create(), except that it caches
67 * the hb-face using the generic pointer of the ft-face. This means 67 * the hb-face using the generic pointer of the ft-face. This means
68 * that subsequent calls to this function with the same ft-face will 68 * that subsequent calls to this function with the same ft-face will
69 * return the same hb-face (correctly referenced). 69 * return the same hb-face (correctly referenced).
70 * 70 *
71 * Client is still responsible for making sure that ft-face is destroyed 71 * Client is still responsible for making sure that ft-face is destroyed
72 * after hb-face is. 72 * after hb-face is.
73 */ 73 */
74 hb_face_t * 74 HB_EXTERN hb_face_t *
75 hb_ft_face_create_cached (FT_Face ft_face); 75 hb_ft_face_create_cached (FT_Face ft_face);
76 76
77 /* This version is like hb_ft_face_create(), except that it calls 77 /* This version is like hb_ft_face_create(), except that it calls
78 * FT_Reference_Face() on ft-face, as such keeping ft-face alive 78 * FT_Reference_Face() on ft-face, as such keeping ft-face alive
79 * as long as the hb-face is. 79 * as long as the hb-face is.
80 * 80 *
81 * This is the most convenient version to use. Use it unless you have 81 * This is the most convenient version to use. Use it unless you have
82 * very good reasons not to. 82 * very good reasons not to.
83 */ 83 */
84 hb_face_t * 84 HB_EXTERN hb_face_t *
85 hb_ft_face_create_referenced (FT_Face ft_face); 85 hb_ft_face_create_referenced (FT_Face ft_face);
86 86
87 87
88 /* 88 /*
89 * hb-font from ft-face. 89 * hb-font from ft-face.
90 */ 90 */
91 91
92 /* 92 /*
93 * Note: 93 * Note:
94 * 94 *
95 * Set face size on ft-face before creating hb-font from it. 95 * Set face size on ft-face before creating hb-font from it.
96 * Otherwise hb-ft would NOT pick up the font size correctly. 96 * Otherwise hb-ft would NOT pick up the font size correctly.
97 */ 97 */
98 98
99 /* See notes on hb_ft_face_create(). Same issues re lifecycle-management 99 /* See notes on hb_ft_face_create(). Same issues re lifecycle-management
100 * apply here. Use hb_ft_font_create_referenced() if you can. */ 100 * apply here. Use hb_ft_font_create_referenced() if you can. */
101 hb_font_t * 101 HB_EXTERN hb_font_t *
102 hb_ft_font_create (FT_Face ft_face, 102 hb_ft_font_create (FT_Face ft_face,
103 hb_destroy_func_t destroy); 103 hb_destroy_func_t destroy);
104 104
105 /* See notes on hb_ft_face_create_referenced() re lifecycle-management 105 /* See notes on hb_ft_face_create_referenced() re lifecycle-management
106 * issues. */ 106 * issues. */
107 hb_font_t * 107 HB_EXTERN hb_font_t *
108 hb_ft_font_create_referenced (FT_Face ft_face); 108 hb_ft_font_create_referenced (FT_Face ft_face);
109 109
110 FT_Face 110 HB_EXTERN FT_Face
111 hb_ft_font_get_face (hb_font_t *font); 111 hb_ft_font_get_face (hb_font_t *font);
112 112
113 void 113 HB_EXTERN void
114 hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); 114 hb_ft_font_set_load_flags (hb_font_t *font, int load_flags);
115 115
116 int 116 HB_EXTERN int
117 hb_ft_font_get_load_flags (hb_font_t *font); 117 hb_ft_font_get_load_flags (hb_font_t *font);
118 118
119 /* Makes an hb_font_t use FreeType internally to implement font functions. */ 119 /* Makes an hb_font_t use FreeType internally to implement font functions. */
120 void 120 HB_EXTERN void
121 hb_ft_font_set_funcs (hb_font_t *font); 121 hb_ft_font_set_funcs (hb_font_t *font);
122 122
123 123
124 HB_END_DECLS 124 HB_END_DECLS
125 125
126 #endif /* HB_FT_H */ 126 #endif /* HB_FT_H */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-font-private.hh ('k') | third_party/harfbuzz-ng/src/hb-ft.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698