[amalgam] Use it in cmake port and fix conflicts (#1812)
This commit is contained in:
parent
b240d701fd
commit
9fea6b4dd4
|
@ -264,7 +264,7 @@ jobs:
|
||||||
- image: dockcross/android-arm
|
- image: dockcross/android-arm
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: cmake -Bbuild -H. -GNinja
|
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
|
||||||
- run: ninja -Cbuild
|
- run: ninja -Cbuild
|
||||||
|
|
||||||
crosscompile-cmake-notest-browser-asmjs-hb_tiny:
|
crosscompile-cmake-notest-browser-asmjs-hb_tiny:
|
||||||
|
@ -272,7 +272,7 @@ jobs:
|
||||||
- image: dockcross/browser-asmjs
|
- image: dockcross/browser-asmjs
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: cmake -Bbuild -H. -GNinja -DCMAKE_CXX_FLAGS="-DHB_TINY"
|
- run: cmake -Bbuild -H. -GNinja -DCMAKE_CXX_FLAGS="-DHB_TINY" -DHB_BUILD_TESTS=OFF
|
||||||
- run: ninja -Cbuild
|
- run: ninja -Cbuild
|
||||||
|
|
||||||
crosscompile-cmake-notest-linux-arm64:
|
crosscompile-cmake-notest-linux-arm64:
|
||||||
|
@ -280,7 +280,7 @@ jobs:
|
||||||
- image: dockcross/linux-arm64
|
- image: dockcross/linux-arm64
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: cmake -Bbuild -H. -GNinja
|
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
|
||||||
- run: ninja -Cbuild
|
- run: ninja -Cbuild
|
||||||
|
|
||||||
crosscompile-cmake-notest-linux-mips:
|
crosscompile-cmake-notest-linux-mips:
|
||||||
|
@ -288,7 +288,7 @@ jobs:
|
||||||
- image: dockcross/linux-mips
|
- image: dockcross/linux-mips
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: cmake -Bbuild -H. -GNinja
|
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
|
||||||
- run: ninja -Cbuild
|
- run: ninja -Cbuild
|
||||||
|
|
||||||
#crosscompile-cmake-notest-windows-x64:
|
#crosscompile-cmake-notest-windows-x64:
|
||||||
|
|
|
@ -157,8 +157,6 @@ endfunction ()
|
||||||
file(READ ${PROJECT_SOURCE_DIR}/src/Makefile.sources SRCSOURCES)
|
file(READ ${PROJECT_SOURCE_DIR}/src/Makefile.sources SRCSOURCES)
|
||||||
file(READ ${PROJECT_SOURCE_DIR}/util/Makefile.sources UTILSOURCES)
|
file(READ ${PROJECT_SOURCE_DIR}/util/Makefile.sources UTILSOURCES)
|
||||||
|
|
||||||
extract_make_variable(HB_BASE_sources ${SRCSOURCES})
|
|
||||||
add_prefix_to_list(HB_BASE_sources "${PROJECT_SOURCE_DIR}/src/")
|
|
||||||
extract_make_variable(HB_BASE_headers ${SRCSOURCES})
|
extract_make_variable(HB_BASE_headers ${SRCSOURCES})
|
||||||
add_prefix_to_list(HB_BASE_headers "${PROJECT_SOURCE_DIR}/src/")
|
add_prefix_to_list(HB_BASE_headers "${PROJECT_SOURCE_DIR}/src/")
|
||||||
|
|
||||||
|
@ -192,59 +190,12 @@ set (HB_VERSION_MAJOR ${CMAKE_MATCH_2})
|
||||||
set (HB_VERSION_MINOR ${CMAKE_MATCH_3})
|
set (HB_VERSION_MINOR ${CMAKE_MATCH_3})
|
||||||
set (HB_VERSION_MICRO ${CMAKE_MATCH_4})
|
set (HB_VERSION_MICRO ${CMAKE_MATCH_4})
|
||||||
|
|
||||||
|
|
||||||
## Define ragel tasks
|
|
||||||
# if (NOT IN_HB_DIST)
|
|
||||||
# foreach (ragel_output IN ITEMS ${HB_BASE_RAGEL_GENERATED_sources})
|
|
||||||
# string(REGEX MATCH "([^/]+)\\.hh" temp ${ragel_output})
|
|
||||||
# set (target_name ${CMAKE_MATCH_1})
|
|
||||||
# add_custom_command(OUTPUT ${ragel_output}
|
|
||||||
# COMMAND ${RAGEL} -G2 -o ${ragel_output} ${PROJECT_SOURCE_DIR}/src/${target_name}.rl -I ${PROJECT_SOURCE_DIR} ${ARGN}
|
|
||||||
# DEPENDS ${PROJECT_SOURCE_DIR}/src/${target_name}.rl
|
|
||||||
# )
|
|
||||||
# add_custom_target(harfbuzz_${target_name} DEPENDS ${PROJECT_BINARY_DIR}/src/${target_name})
|
|
||||||
# endforeach ()
|
|
||||||
|
|
||||||
# mark_as_advanced(RAGEL)
|
|
||||||
# endif ()
|
|
||||||
|
|
||||||
|
|
||||||
## Generate hb-version.h
|
|
||||||
# if (NOT IN_HB_DIST)
|
|
||||||
# set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in")
|
|
||||||
# set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h")
|
|
||||||
# set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true)
|
|
||||||
# configure_file("${HB_VERSION_H_IN}" "${HB_VERSION_H}.tmp" @ONLY)
|
|
||||||
# execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different
|
|
||||||
# "${HB_VERSION_H}.tmp"
|
|
||||||
# "${HB_VERSION_H}"
|
|
||||||
# )
|
|
||||||
# file(REMOVE "${HB_VERSION_H}.tmp")
|
|
||||||
# endif ()
|
|
||||||
|
|
||||||
|
|
||||||
## Define sources and headers of the project
|
## Define sources and headers of the project
|
||||||
set (project_sources
|
set (project_sources ${PROJECT_SOURCE_DIR}/src/harfbuzz.cc) # use amalgam source
|
||||||
${HB_BASE_sources}
|
set (subset_project_sources ${HB_SUBSET_sources})
|
||||||
${HB_BASE_RAGEL_GENERATED_sources}
|
|
||||||
)
|
|
||||||
|
|
||||||
set (subset_project_sources
|
|
||||||
${HB_SUBSET_sources}
|
|
||||||
)
|
|
||||||
|
|
||||||
set (project_extra_sources)
|
set (project_extra_sources)
|
||||||
|
set (project_headers ${HB_BASE_headers})
|
||||||
set (project_headers
|
set (subset_project_headers ${HB_SUBSET_headers})
|
||||||
#${HB_VERSION_H}
|
|
||||||
|
|
||||||
${HB_BASE_headers}
|
|
||||||
)
|
|
||||||
|
|
||||||
set (subset_project_headers
|
|
||||||
${HB_SUBSET_headers}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
## Find and include needed header folders and libraries
|
## Find and include needed header folders and libraries
|
||||||
if (HB_HAVE_FREETYPE)
|
if (HB_HAVE_FREETYPE)
|
||||||
|
@ -257,7 +208,6 @@ if (HB_HAVE_FREETYPE)
|
||||||
include_directories(AFTER ${FREETYPE_INCLUDE_DIRS})
|
include_directories(AFTER ${FREETYPE_INCLUDE_DIRS})
|
||||||
add_definitions(-DHAVE_FREETYPE=1)
|
add_definitions(-DHAVE_FREETYPE=1)
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
|
||||||
|
|
||||||
# So check_funcs can find its headers
|
# So check_funcs can find its headers
|
||||||
|
@ -275,7 +225,6 @@ if (HB_HAVE_GRAPHITE2)
|
||||||
|
|
||||||
include_directories(${GRAPHITE2_INCLUDE_DIR})
|
include_directories(${GRAPHITE2_INCLUDE_DIR})
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-graphite2.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-graphite2.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-graphite2.h)
|
||||||
|
|
||||||
list(APPEND THIRD_PARTY_LIBS ${GRAPHITE2_LIBRARY})
|
list(APPEND THIRD_PARTY_LIBS ${GRAPHITE2_LIBRARY})
|
||||||
|
@ -296,7 +245,6 @@ if (HB_HAVE_GLIB)
|
||||||
|
|
||||||
include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR})
|
include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
|
||||||
|
|
||||||
list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES})
|
list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES})
|
||||||
|
@ -316,7 +264,6 @@ if (HB_HAVE_ICU)
|
||||||
|
|
||||||
include_directories(${ICU_INCLUDE_DIR})
|
include_directories(${ICU_INCLUDE_DIR})
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-icu.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
|
||||||
|
|
||||||
list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARY})
|
list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARY})
|
||||||
|
@ -328,7 +275,6 @@ if (APPLE AND HB_HAVE_CORETEXT)
|
||||||
# Apple Advanced Typography
|
# Apple Advanced Typography
|
||||||
add_definitions(-DHAVE_CORETEXT)
|
add_definitions(-DHAVE_CORETEXT)
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-coretext.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h)
|
||||||
|
|
||||||
if (HB_IOS)
|
if (HB_IOS)
|
||||||
|
@ -361,19 +307,13 @@ endif ()
|
||||||
|
|
||||||
if (WIN32 AND HB_HAVE_UNISCRIBE)
|
if (WIN32 AND HB_HAVE_UNISCRIBE)
|
||||||
add_definitions(-DHAVE_UNISCRIBE)
|
add_definitions(-DHAVE_UNISCRIBE)
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.h)
|
||||||
|
|
||||||
list(APPEND THIRD_PARTY_LIBS usp10 gdi32 rpcrt4)
|
list(APPEND THIRD_PARTY_LIBS usp10 gdi32 rpcrt4)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (WIN32 AND HB_HAVE_DIRECTWRITE)
|
if (WIN32 AND HB_HAVE_DIRECTWRITE)
|
||||||
add_definitions(-DHAVE_DIRECTWRITE)
|
add_definitions(-DHAVE_DIRECTWRITE)
|
||||||
|
|
||||||
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-directwrite.cc)
|
|
||||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h)
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h)
|
||||||
|
|
||||||
list(APPEND THIRD_PARTY_LIBS dwrite rpcrt4)
|
list(APPEND THIRD_PARTY_LIBS dwrite rpcrt4)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -481,7 +421,6 @@ if (HB_HAVE_GOBJECT)
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
## Atomic ops availability detection
|
## Atomic ops availability detection
|
||||||
file(WRITE "${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives.c"
|
file(WRITE "${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives.c"
|
||||||
" void memory_barrier (void) { __sync_synchronize (); }
|
" void memory_barrier (void) { __sync_synchronize (); }
|
||||||
|
@ -590,7 +529,6 @@ if (WIN32)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (HB_HAVE_INTROSPECTION)
|
if (HB_HAVE_INTROSPECTION)
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
pkg_check_modules(PC_GI QUIET gobject-introspection-1.0)
|
pkg_check_modules(PC_GI QUIET gobject-introspection-1.0)
|
||||||
|
|
||||||
|
@ -824,7 +762,7 @@ endif ()
|
||||||
|
|
||||||
if (HB_BUILD_TESTS)
|
if (HB_BUILD_TESTS)
|
||||||
## src/ executables
|
## src/ executables
|
||||||
foreach (prog main test test-gsub-would-substitute test-gpos-size-params test-buffer-serialize hb-ot-tag test-unicode-ranges)
|
foreach (prog main test test-gsub-would-substitute test-gpos-size-params test-buffer-serialize test-unicode-ranges) # hb-ot-tag
|
||||||
set (prog_name ${prog})
|
set (prog_name ${prog})
|
||||||
if (${prog_name} STREQUAL "test")
|
if (${prog_name} STREQUAL "test")
|
||||||
# test can not be used as a valid executable name on cmake, lets special case it
|
# test can not be used as a valid executable name on cmake, lets special case it
|
||||||
|
@ -833,7 +771,7 @@ if (HB_BUILD_TESTS)
|
||||||
add_executable(${prog_name} ${PROJECT_SOURCE_DIR}/src/${prog}.cc)
|
add_executable(${prog_name} ${PROJECT_SOURCE_DIR}/src/${prog}.cc)
|
||||||
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
|
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
|
# set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
if (UNIX OR MINGW)
|
if (UNIX OR MINGW)
|
||||||
|
|
|
@ -12,6 +12,8 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
|
||||||
TESTS =
|
TESTS =
|
||||||
check_PROGRAMS =
|
check_PROGRAMS =
|
||||||
|
|
||||||
|
EXTRA_DIST += harfbuzz.cc
|
||||||
|
|
||||||
# Convenience targets:
|
# Convenience targets:
|
||||||
lib: $(BUILT_SOURCES) libharfbuzz.la
|
lib: $(BUILT_SOURCES) libharfbuzz.la
|
||||||
libs: $(BUILT_SOURCES) $(lib_LTLIBRARIES)
|
libs: $(BUILT_SOURCES) $(lib_LTLIBRARIES)
|
||||||
|
|
|
@ -378,7 +378,7 @@ typedef hb_vector_t<byte_str_t> byte_str_array_t;
|
||||||
|
|
||||||
/* stack */
|
/* stack */
|
||||||
template <typename ELEM, int LIMIT>
|
template <typename ELEM, int LIMIT>
|
||||||
struct stack_t
|
struct cff_stack_t
|
||||||
{
|
{
|
||||||
void init ()
|
void init ()
|
||||||
{
|
{
|
||||||
|
@ -469,7 +469,7 @@ struct stack_t
|
||||||
|
|
||||||
/* argument stack */
|
/* argument stack */
|
||||||
template <typename ARG=number_t>
|
template <typename ARG=number_t>
|
||||||
struct arg_stack_t : stack_t<ARG, 513>
|
struct arg_stack_t : cff_stack_t<ARG, 513>
|
||||||
{
|
{
|
||||||
void push_int (int v)
|
void push_int (int v)
|
||||||
{
|
{
|
||||||
|
@ -523,7 +523,7 @@ struct arg_stack_t : stack_t<ARG, 513>
|
||||||
{ return S::elements.sub_array (start); }
|
{ return S::elements.sub_array (start); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef stack_t<ARG, 513> S;
|
typedef cff_stack_t<ARG, 513> S;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* an operator prefixed by its operands in a byte string */
|
/* an operator prefixed by its operands in a byte string */
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct call_context_t
|
||||||
|
|
||||||
/* call stack */
|
/* call stack */
|
||||||
const unsigned int kMaxCallLimit = 10;
|
const unsigned int kMaxCallLimit = 10;
|
||||||
struct call_stack_t : stack_t<call_context_t, kMaxCallLimit> {};
|
struct call_stack_t : cff_stack_t<call_context_t, kMaxCallLimit> {};
|
||||||
|
|
||||||
template <typename SUBRS>
|
template <typename SUBRS>
|
||||||
struct biased_subrs_t
|
struct biased_subrs_t
|
||||||
|
|
|
@ -75,7 +75,7 @@ release_table_data (void *user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
_hb_cg_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
CGFontRef cg_font = reinterpret_cast<CGFontRef> (user_data);
|
CGFontRef cg_font = reinterpret_cast<CGFontRef> (user_data);
|
||||||
CFDataRef cf_data = CGFontCopyTableForTag (cg_font, tag);
|
CFDataRef cf_data = CGFontCopyTableForTag (cg_font, tag);
|
||||||
|
@ -299,7 +299,7 @@ _hb_coretext_shaper_face_data_destroy (hb_coretext_face_data_t *data)
|
||||||
hb_face_t *
|
hb_face_t *
|
||||||
hb_coretext_face_create (CGFontRef cg_font)
|
hb_coretext_face_create (CGFontRef cg_font)
|
||||||
{
|
{
|
||||||
return hb_face_create_for_tables (reference_table, CGFontRetain (cg_font), _hb_cg_font_release);
|
return hb_face_create_for_tables (_hb_cg_reference_table, CGFontRetain (cg_font), _hb_cg_font_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -539,10 +539,10 @@ protected:
|
||||||
Run mRunHead;
|
Run mRunHead;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline uint16_t hb_uint16_swap (const uint16_t v)
|
static inline uint16_t hb_dw_uint16_swap (const uint16_t v)
|
||||||
{ return (v >> 8) | (v << 8); }
|
{ return (v >> 8) | (v << 8); }
|
||||||
static inline uint32_t hb_uint32_swap (const uint32_t v)
|
static inline uint32_t hb_dw_uint32_swap (const uint32_t v)
|
||||||
{ return (hb_uint16_swap (v) << 16) | hb_uint16_swap (v >> 16); }
|
{ return (hb_dw_uint16_swap (v) << 16) | hb_dw_uint16_swap (v >> 16); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* shaper
|
* shaper
|
||||||
|
@ -653,7 +653,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
|
||||||
for (unsigned int i = 0; i < num_features; ++i)
|
for (unsigned int i = 0; i < num_features; ++i)
|
||||||
{
|
{
|
||||||
typographic_features.features[i].nameTag = (DWRITE_FONT_FEATURE_TAG)
|
typographic_features.features[i].nameTag = (DWRITE_FONT_FEATURE_TAG)
|
||||||
hb_uint32_swap (features[i].tag);
|
hb_dw_uint32_swap (features[i].tag);
|
||||||
typographic_features.features[i].parameter = features[i].value;
|
typographic_features.features[i].parameter = features[i].value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -934,14 +934,14 @@ _hb_directwrite_table_data_release (void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
_hb_directwrite_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
IDWriteFontFace *dw_face = ((IDWriteFontFace *) user_data);
|
IDWriteFontFace *dw_face = ((IDWriteFontFace *) user_data);
|
||||||
const void *data;
|
const void *data;
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
void *table_context;
|
void *table_context;
|
||||||
BOOL exists;
|
BOOL exists;
|
||||||
if (!dw_face || FAILED (dw_face->TryGetFontTable (hb_uint32_swap (tag), &data,
|
if (!dw_face || FAILED (dw_face->TryGetFontTable (hb_dw_uint32_swap (tag), &data,
|
||||||
&length, &table_context, &exists)))
|
&length, &table_context, &exists)))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -979,7 +979,7 @@ hb_directwrite_face_create (IDWriteFontFace *font_face)
|
||||||
{
|
{
|
||||||
if (font_face)
|
if (font_face)
|
||||||
font_face->AddRef ();
|
font_face->AddRef ();
|
||||||
return hb_face_create_for_tables (reference_table, font_face,
|
return hb_face_create_for_tables (_hb_directwrite_reference_table, font_face,
|
||||||
_hb_directwrite_font_release);
|
_hb_directwrite_font_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -564,7 +564,7 @@ _hb_ft_font_set_funcs (hb_font_t *font, FT_Face ft_face, bool unref)
|
||||||
|
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
_hb_ft_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) user_data;
|
FT_Face ft_face = (FT_Face) user_data;
|
||||||
FT_Byte *buffer;
|
FT_Byte *buffer;
|
||||||
|
@ -619,7 +619,7 @@ hb_ft_face_create (FT_Face ft_face,
|
||||||
face = hb_face_create (blob, ft_face->face_index);
|
face = hb_face_create (blob, ft_face->face_index);
|
||||||
hb_blob_destroy (blob);
|
hb_blob_destroy (blob);
|
||||||
} else {
|
} else {
|
||||||
face = hb_face_create_for_tables (reference_table, ft_face, destroy);
|
face = hb_face_create_for_tables (_hb_ft_reference_table, ft_face, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
hb_face_set_index (face, ft_face->face_index);
|
hb_face_set_index (face, ft_face->face_index);
|
||||||
|
|
Loading…
Reference in New Issue