mirror of https://github.com/Chlumsky/msdfgen.git
Build fixes, updated changelog and readme
This commit is contained in:
parent
3f917b8019
commit
b1969ab2e8
|
|
@ -8,6 +8,7 @@
|
|||
/x86/
|
||||
/x64/
|
||||
.vs/
|
||||
.vscode/
|
||||
*.exe
|
||||
*.zip
|
||||
*.user
|
||||
|
|
|
|||
17
CHANGELOG.md
17
CHANGELOG.md
|
|
@ -1,4 +1,21 @@
|
|||
|
||||
## Version 1.10
|
||||
|
||||
- Switched to vcpkg as the primary dependency management system
|
||||
- Switched to libpng as the primary PNG file encoder
|
||||
- Parameters of variable fonts can be specified
|
||||
- Fixed a bug that prevented glyph 0 to be specified in a glyphset
|
||||
|
||||
### Version 1.9.2 (2021-12-01)
|
||||
|
||||
- Improved detection of numerical errors in cubic equation solver
|
||||
- Added -windingpreprocess option
|
||||
- Fixed edge coloring not restored if lost during preprocessing
|
||||
|
||||
### Version 1.9.1 (2021-07-09)
|
||||
|
||||
- Fixed an edge case bug in the new MSDF error correction algorithm
|
||||
|
||||
## Version 1.9 (2021-05-28)
|
||||
|
||||
- Error correction of multi-channel distance fields has been completely reworked
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@ if(MSDFGEN_CORE_ONLY AND MSDFGEN_USE_VCPKG)
|
|||
set(MSDFGEN_USE_VCPKG OFF)
|
||||
endif()
|
||||
|
||||
get_property(MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release")
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
if(MSDFGEN_USE_VCPKG)
|
||||
# Make sure that vcpkg toolchain file is set
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
|
|
@ -38,6 +44,22 @@ if(MSDFGEN_USE_VCPKG)
|
|||
message(WARNING "Vcpkg triplet not explicitly specified and could not be deduced. Recommend using -DVCPKG_TARGET_TRIPLET=x86-windows-static or similar")
|
||||
endif()
|
||||
endif()
|
||||
# Select project features
|
||||
if(NOT MSDFGEN_VCPKG_FEATURES_SET)
|
||||
set(VCPKG_MANIFEST_NO_DEFAULT_FEATURES ON)
|
||||
if(NOT MSDFGEN_CORE_ONLY)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "extensions")
|
||||
endif()
|
||||
if(MSDFGEN_BUILD_STANDALONE)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "standalone")
|
||||
endif()
|
||||
if(MSDFGEN_USE_SKIA)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "geometry-preprocessing")
|
||||
endif()
|
||||
if(MSDFGEN_USE_OPENMP)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "openmp")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Version is specified in vcpkg.json
|
||||
|
|
@ -106,11 +128,15 @@ if(NOT MSDFGEN_CORE_ONLY)
|
|||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdfgen-ext)
|
||||
|
||||
if(MSDFGEN_USE_SKIA)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
if(NOT TARGET skia)
|
||||
find_package(skia REQUIRED)
|
||||
endif()
|
||||
target_compile_features(msdfgen-ext PUBLIC cxx_std_17)
|
||||
target_compile_definitions(msdfgen-ext PUBLIC MSDFGEN_USE_SKIA)
|
||||
target_link_libraries(msdfgen-ext PRIVATE skia)
|
||||
target_link_libraries(msdfgen-ext PRIVATE Threads::Threads skia)
|
||||
endif()
|
||||
|
||||
add_library(msdfgen-full INTERFACE)
|
||||
|
|
|
|||
16
README.md
16
README.md
|
|
@ -25,16 +25,22 @@ and **[extensions](ext)**. The core module has no dependencies and only uses bar
|
|||
key data structures and algorithms, which can be accessed through the [msdfgen.h](msdfgen.h) header.
|
||||
Extensions contain utilities for loading fonts and SVG files, as well as saving PNG images.
|
||||
Those are exposed by the [msdfgen-ext.h](msdfgen-ext.h) header. This module uses
|
||||
[FreeType](http://www.freetype.org/),
|
||||
[TinyXML2](http://www.grinninglizard.com/tinyxml2/),
|
||||
[LodePNG](http://lodev.org/lodepng/),
|
||||
[FreeType](https://freetype.org/),
|
||||
[TinyXML2](https://www.grinninglizard.com/tinyxml2/),
|
||||
[libpng](http://www.libpng.org/pub/png/libpng.html),
|
||||
and (optionally) [Skia](https://skia.org/).
|
||||
|
||||
Additionally, there is the [main.cpp](main.cpp), which wraps the functionality into
|
||||
a comprehensive standalone console program. To start using the program immediately,
|
||||
there is a Windows binary available for download in the ["Releases" section](https://github.com/Chlumsky/msdfgen/releases).
|
||||
To build the project, you may use the included [Visual Studio solution](Msdfgen.sln)
|
||||
or [CMake script](CMakeLists.txt).
|
||||
To use the project as a library, you may install it via the [vcpkg](https://vcpkg.io) package manager as
|
||||
```
|
||||
vcpkg install msdfgen
|
||||
```
|
||||
Or, to build the project from source, you may use the included [CMake script](CMakeLists.txt).
|
||||
In its default configuration, it requires [vcpkg](https://vcpkg.io) as the provider for third-party library dependencies.
|
||||
If you set the environment variable `VCPKG_ROOT` to the vcpkg directory,
|
||||
the CMake configuration will take care of fetching all required packages from vcpkg.
|
||||
|
||||
## Console commands
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ include("${CMAKE_CURRENT_LIST_DIR}/msdfgenTargets.cmake")
|
|||
|
||||
if(NOT MSDFGEN_CORE_ONLY)
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.18.0")
|
||||
set_target_properties(msdfgen::msdfgen-all PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
set_target_properties(msdfgen::msdfgen-full PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_library(msdfgen::msdfgen ALIAS msdfgen::msdfgen-all)
|
||||
add_library(msdfgen::msdfgen ALIAS msdfgen::msdfgen-full)
|
||||
endif()
|
||||
|
||||
if(MSDFGEN_STANDALONE_AVAILABLE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue