diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-26 07:02:46 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-26 07:02:46 +0300 |
commit | 512702de740c3c6b38097d101f1f454d7da22e97 (patch) | |
tree | f0562a6872131fcc271d4838d3761a67408d62e7 /CMakeLists.txt | |
parent | 5dbc85eaaa1bd0a0fc11dd76a75ece2efe763df5 (diff) |
Text: Link with HarfBuzz; old run_Font_ is a fallback
HarfBuzz will provide proper Unicode text shaping for both simple and complex scripts.
The old `run_Font_` is available for use as a fallback if HarfBuzz is not available due to size or complexity constraints (it's written in C++).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cd2442..e6baba76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -29,6 +29,7 @@ if (IOS) | |||
29 | endif () | 29 | endif () |
30 | 30 | ||
31 | # Build configuration. | 31 | # Build configuration. |
32 | option (ENABLE_HARFBUZZ "Use HarfBuzz to shape text" ON) | ||
32 | option (ENABLE_IPC "Use IPC to communicate between running instances" ON) | 33 | option (ENABLE_IPC "Use IPC to communicate between running instances" ON) |
33 | option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON) | 34 | option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON) |
34 | option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) | 35 | option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) |
@@ -308,6 +309,10 @@ if (ENABLE_CUSTOM_FRAME AND MSYS) | |||
308 | endif () | 309 | endif () |
309 | target_link_libraries (app PUBLIC the_Foundation::the_Foundation) | 310 | target_link_libraries (app PUBLIC the_Foundation::the_Foundation) |
310 | target_link_libraries (app PUBLIC ${SDL2_LDFLAGS}) | 311 | target_link_libraries (app PUBLIC ${SDL2_LDFLAGS}) |
312 | if (ENABLE_HARFBUZZ AND HARFBUZZ_FOUND) | ||
313 | target_link_libraries (app PUBLIC harfbuzz) | ||
314 | target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_HARFBUZZ=1) | ||
315 | endif () | ||
311 | if (APPLE) | 316 | if (APPLE) |
312 | if (IOS) | 317 | if (IOS) |
313 | target_link_libraries (app PUBLIC "-framework UIKit") | 318 | target_link_libraries (app PUBLIC "-framework UIKit") |