SK_C_API bool sk_stream_move(sk_stream_t* cstream, long offset);
SK_C_API bool sk_stream_has_length(sk_stream_t* cstream);
SK_C_API size_t sk_stream_get_length(sk_stream_t* cstream);
+SK_C_API const void* sk_stream_get_memory_base(sk_stream_t* cstream);
////////////////////////////////////////////////////////////////////////////////
SK_C_API sk_typeface_t* sk_typeface_create_from_file(const char* path, int index);
SK_C_API sk_typeface_t* sk_typeface_create_from_stream(sk_stream_asset_t* stream, int index);
SK_C_API int sk_typeface_chars_to_glyphs(sk_typeface_t* typeface, const char *chars, sk_encoding_t encoding, uint16_t glyphs[], int glyphCount);
+SK_C_API sk_stream_asset_t* sk_typeface_open_stream(sk_typeface_t* typeface, int* ttcIndex);
+SK_C_API int sk_typeface_get_units_per_em(sk_typeface_t* typeface);
SK_C_API sk_string_t* sk_typeface_get_family_name(sk_typeface_t* typeface);
SK_C_API int sk_typeface_get_font_weight(sk_typeface_t* typeface);
return AsStream(cstream)->getLength();
}
+const void* sk_stream_get_memory_base(sk_stream_t* cstream)
+{
+ return AsStream(cstream)->getMemoryBase();
+}
+
void sk_filewstream_destroy(sk_wstream_filestream_t* cstream)
{
delete AsFileWStream(cstream);
return (AsTypeface(typeface))->charsToGlyphs(chars, (SkTypeface::Encoding)encoding, glyphs, glyphCount);
}
+sk_stream_asset_t* sk_typeface_open_stream(sk_typeface_t* typeface, int* ttcIndex)
+{
+ return ToStreamAsset(AsTypeface(typeface)->openStream(ttcIndex));
+}
+
+int sk_typeface_get_units_per_em(sk_typeface_t* typeface)
+{
+ return AsTypeface(typeface)->getUnitsPerEm();
+}
+
int sk_typeface_glyph_count (sk_typeface_t* typeface)
{
return AsTypeface(typeface)->countGlyphs();