Files
Crosspoint/test/cpfont_adapter/CMakeLists.txt
Justin Mitchell bfb8aacdae Add framebuffer release and font metadata access
Introduce methods to temporarily release the 48KB framebuffer during memory-intensive chapter builds, allowing the memory to be reused. Add font metadata query methods (hasGlyphMeta, ensureAdvance) that check glyph existence and fetch advance metrics without loading full bitmap data, avoiding expensive SD reads during layout measurement.
2026-07-08 04:46:25 -04:00

36 lines
1.2 KiB
CMake

# CpFontAdapter binds .cpfont metrics to FreeInkBook's RenderFont interface;
# the suite needs the engine's freestanding headers. Prefer the submodule;
# fall back to the sibling working checkout while the submodule pin predates
# libs/book (drop the fallback once the pin advances).
set(FREEINK_BOOK_INCLUDE "${REPO_ROOT}/freeink-sdk/libs/book/FreeInkBook/include")
if(NOT EXISTS "${FREEINK_BOOK_INCLUDE}")
set(FREEINK_BOOK_INCLUDE "$ENV{HOME}/GitHub/freeink-sdk/libs/book/FreeInkBook/include")
endif()
if(NOT EXISTS "${FREEINK_BOOK_INCLUDE}")
message(WARNING "FreeInkBook headers not found - skipping CpFontAdapterTest")
else()
add_executable(CpFontAdapterTest
CpFontAdapterTest.cpp
SdCardFontStubs.cpp
${REPO_ROOT}/src/activities/reader/CpFontAdapter.cpp
${REPO_ROOT}/lib/EpdFont/EpdFont.cpp
${REPO_ROOT}/lib/EpdFont/EpdFontFamily.cpp
${REPO_ROOT}/lib/Utf8/Utf8.cpp
)
target_include_directories(CpFontAdapterTest PRIVATE
${REPO_ROOT}/src/activities/reader
${REPO_ROOT}/lib/EpdFont
${REPO_ROOT}/lib/Utf8
${FREEINK_BOOK_INCLUDE}
)
target_link_libraries(CpFontAdapterTest PRIVATE
crosspoint_test_common
GTest::gtest_main
)
gtest_discover_tests(CpFontAdapterTest)
endif()