fix(text): carry a glyph's negative bearing and harden the bake's extents

This commit is contained in:
Martino Ferrari committed 2026-09-28 16:32:18 +02:00
1 parent b0f9fbbb35
commit d853db62ae
5 files changed
+470 -60

No files matched your search

+10
View File
@@ -91,6 +91,16 @@ if(TARGET plot::font_ttf)
target_compile_definitions(plot_tests PRIVATE
PLOT_CORE_ARCHIVE="$<TARGET_FILE:plot_core>"
PLOT_CMAKE_COMMAND="${CMAKE_COMMAND}")
# The cases compare a bake against the rasteriser's own glyph bitmaps, which is
# the only reference that can tell a complete cell from a clipped one, and for
# that the test needs the vendored header's *declarations* (its implementation is
# already in the binary through plot::font_ttf). This is the optional target's
# own test, compiled only when that target exists, and it is the one target
# outside src/text that sees third_party/: the isolation this project promises --
# plot_core's archive and every public header under include/plot/ -- is what
# plot_core_stays_free_of_stb_truetype keeps asserting, and it is unaffected by
# which include paths a test binary has.
target_include_directories(plot_tests PRIVATE "${CMAKE_SOURCE_DIR}/third_party")
endif()
# Same switches the library is built with: the cost tests read the counters