mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
[coretext] Configure hb_coretext_font_create() with CT font funcs
Not sure if this is a good idea...
This commit is contained in:
1 parent
8a805271a1
commit
8db2997e4e
4 files changed
+25
-3
No files matched your search
@@ -343,6 +343,7 @@ hb_coretext_face_create
|
||||
hb_coretext_font_create
|
||||
hb_coretext_face_get_cg_font
|
||||
hb_coretext_font_get_ct_font
|
||||
hb_coretext_font_set_funcs
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
||||
+16
-2
@@ -279,9 +279,23 @@ _hb_coretext_get_font_funcs ()
|
||||
* hb_coretext_font_set_funcs:
|
||||
* @font: #hb_font_t to work upon
|
||||
*
|
||||
* Sets the font functions to use when working with @font.
|
||||
* Configures the font-functions structure of the specified
|
||||
* #hb_font_t font object to use CoreText font functions.
|
||||
*
|
||||
* Since: 0.9.28
|
||||
* In particular, you can use this function to configure an
|
||||
* existing #hb_face_t face object for use with CoreText font
|
||||
* functions even if that #hb_face_t face object was initially
|
||||
* created with hb_face_create(), and therefore was not
|
||||
* initially configured to use CoreText font functions.
|
||||
*
|
||||
* An #hb_font_t object created with hb_coretext_font_create()
|
||||
* is preconfigured for CoreText font functions and does not
|
||||
* require this function to be used.
|
||||
*
|
||||
* <note>Note: Internally, this function creates a CTFont.
|
||||
* </note>
|
||||
*
|
||||
* XSince: REPLACEME
|
||||
**/
|
||||
void
|
||||
hb_coretext_font_set_funcs (hb_font_t *font)
|
||||
|
||||
@@ -439,6 +439,9 @@ _hb_coretext_shaper_font_data_destroy (hb_coretext_font_data_t *data)
|
||||
* Creates an #hb_font_t font object from the specified
|
||||
* CTFontRef.
|
||||
*
|
||||
* The created font is configured to use the CoreText font functions,
|
||||
* as set by hb_coretext_font_set_funcs().
|
||||
*
|
||||
* Return value: the new #hb_font_t font object
|
||||
*
|
||||
* Since: 1.7.2
|
||||
@@ -460,6 +463,8 @@ hb_coretext_font_create (CTFontRef ct_font)
|
||||
/* Let there be dragons here... */
|
||||
font->data.coretext.cmpexch (nullptr, (hb_coretext_font_data_t *) CFRetain (ct_font));
|
||||
|
||||
hb_coretext_font_set_funcs (font);
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -642,7 +642,9 @@ _hb_ot_get_font_funcs ()
|
||||
* hb_ot_font_set_funcs:
|
||||
* @font: #hb_font_t to work upon
|
||||
*
|
||||
* Sets the font functions to use when working with @font.
|
||||
* Sets the font functions to use when working with @font to
|
||||
* the HarfBuzz's native implementation. This is the default
|
||||
* for fonts newly created.
|
||||
*
|
||||
* Since: 0.9.28
|
||||
**/
|
||||
|
||||
Reference in new issue
Block a user