A few changes to reduce the diff
[platform/upstream/libSkiaSharp.git] / include / c / sk_typeface.h
1 /*
2  * Copyright 2016 Xamarin Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
10
11 #ifndef sk_typeface_DEFINED
12 #define sk_typeface_DEFINED
13
14 #include "sk_types.h"
15
16 SK_C_PLUS_PLUS_BEGIN_GUARD
17
18 SK_API sk_typeface_t* sk_typeface_create_from_name(const char *familyName, sk_typeface_style_t style);
19 SK_API sk_typeface_t* sk_typeface_create_from_name_with_font_style(const char *familyName, int weight, int width, sk_font_style_slant_t slant);
20 SK_API void sk_typeface_unref(sk_typeface_t*);
21 SK_API sk_typeface_t* sk_typeface_create_from_typeface(sk_typeface_t* typeface, sk_typeface_style_t sstyle);
22 SK_API sk_typeface_t* sk_typeface_create_from_file(const char* path, int index);
23 SK_API sk_typeface_t* sk_typeface_create_from_stream(sk_stream_asset_t* stream, int index);
24 SK_API int sk_typeface_chars_to_glyphs(sk_typeface_t* typeface, const char *chars, sk_encoding_t encoding, uint16_t glyphs[], int glyphCount);
25
26 SK_API sk_string_t* sk_typeface_get_family_name(sk_typeface_t* typeface);
27
28 SK_API int sk_typeface_count_tables(sk_typeface_t* typeface);
29 SK_API int sk_typeface_get_table_tags(sk_typeface_t* typeface, sk_font_table_tag_t tags[]);
30 SK_API size_t sk_typeface_get_table_size(sk_typeface_t* typeface, sk_font_table_tag_t tag);
31 SK_API size_t sk_typeface_get_table_data(sk_typeface_t* typeface, sk_font_table_tag_t tag, size_t offset, size_t length, void* data);
32
33 SK_C_PLUS_PLUS_END_GUARD
34
35 #endif