Skip to content

Commit 85e8b3d

Browse files
committed
Version 1.12
1 parent aa9478e commit 85e8b3d

4 files changed

Lines changed: 117 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ output.png
2626
render.png
2727
CMakeUserPresets.json
2828
out/
29+
/all-in-one/
2930
/build_xcode/
3031
/cmake-gen.bat
3132
/line-ending-check.bat

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11

2+
## Version 1.12 (2024-05-18)
3+
4+
- Added the possibility to specify asymmetrical distance range (`-arange`, `-apxrange`)
5+
- Added the ability to export the shape into an SVG file (`-exportsvg`)
6+
- Edge coloring no longer colors smooth contours white, which has been found suboptimal
7+
- Fixed incorrect scaling of font glyph coordinates. To preserve backwards compatibility, the user has to enable the fix with an explicit additional argument:
8+
- `-emnormalize` in standalone, `FONT_SCALING_EM_NORMALIZED` in API for coordinates in ems
9+
- `-noemnormalize` in standalone, `FONT_SCALING_NONE` in API for raw integer coordinates
10+
- The default (backwards-compatible) behavior will change in a future version; a warning will be displayed if neither option is set
11+
- Added two new developer-friendly export image formats: RGBA and FL32
12+
- `-size` parameter renamed to `-dimensions` for clarity (old one will be kept for compatibility)
13+
- `generate*SDF` functions now combine projection and range into a single argument (`SDFTransformation`)
14+
- Conversion of floating point color values to 8-bit integers adjusted to match graphics hardware
15+
- Improved edge deconvergence procedure and made sure that calling `Shape::normalize` a second time has no effect
16+
- Fixed certain edge cases where Skia geometry preprocessing wouldn't make the geometry fully compliant
17+
- The term "perpendicular distance" now used instead of "pseudo-distance" (PSDF instead of PseudoSDF in API)
18+
- Fixed a bug in `savePng` where `fclose` could be called on null pointer
19+
- Minor code improvements
20+
221
## Version 1.11 (2023-11-11)
322

423
- Reworked SVG parser, which now supports multiple paths and other shapes - requires Skia

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 - 2024 Viktor Chlumsky
3+
Copyright (c) 2014 - 2024 Viktor Chlumsky
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

build-release.bat

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
@echo off
2+
setlocal
3+
pushd "%~dp0"
4+
5+
if "%VCVARSALL%"=="" set "VCVARSALL=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"
6+
if "%VCTOOLSET%"=="" set "VCTOOLSET=VC143"
7+
8+
if not exist "%VCVARSALL%" (
9+
echo vcvarsall.bat not found, set VCVARSALL to its path
10+
exit /b 1
11+
)
12+
13+
if "%1"=="" (
14+
echo No version specified, using current
15+
set "version=current"
16+
) else (
17+
set "version=%1"
18+
)
19+
set "builddir=%~dp0\build\release-%version%"
20+
21+
if exist "%builddir%" (
22+
echo Deleting contents of %builddir%
23+
rd /s /q "%builddir%"
24+
)
25+
26+
cmake --preset win32 -B "%builddir%\build-win32"
27+
cmake --preset win32-omp -B "%builddir%\build-win32-omp"
28+
cmake --preset win64 -B "%builddir%\build-win64"
29+
cmake --preset win64-omp -B "%builddir%\build-win64-omp"
30+
31+
cmake --build "%builddir%\build-win32" --config Release
32+
cmake --build "%builddir%\build-win32-omp" --config Release
33+
cmake --build "%builddir%\build-win64" --config Release
34+
cmake --build "%builddir%\build-win64-omp" --config Release
35+
36+
mkdir "%builddir%\rel-win32\msdfgen"
37+
mkdir "%builddir%\rel-win32-omp\msdfgen"
38+
mkdir "%builddir%\rel-win64\msdfgen"
39+
mkdir "%builddir%\rel-win64-omp\msdfgen"
40+
41+
copy "%builddir%\build-win32\Release\msdfgen.exe" "%builddir%\rel-win32\msdfgen"
42+
copy "%builddir%\build-win32-omp\Release\msdfgen.exe" "%builddir%\rel-win32-omp\msdfgen"
43+
copy "%builddir%\build-win64\Release\msdfgen.exe" "%builddir%\rel-win64\msdfgen"
44+
copy "%builddir%\build-win64-omp\Release\msdfgen.exe" "%builddir%\rel-win64-omp\msdfgen"
45+
46+
echo msdfgen.exe -defineshape "{ 1471,0; 1149,0; 1021,333; 435,333; 314,0; 0,0; 571,1466; 884,1466; # }{ 926,580; 724,1124; 526,580; # }" -size 16 16 -autoframe -testrender render.png 1024 1024 > "%builddir%\example.bat"
47+
48+
copy "%builddir%\example.bat" "%builddir%\rel-win32\msdfgen"
49+
copy "%builddir%\example.bat" "%builddir%\rel-win32-omp\msdfgen"
50+
copy "%builddir%\example.bat" "%builddir%\rel-win64\msdfgen"
51+
copy "%builddir%\example.bat" "%builddir%\rel-win64-omp\msdfgen"
52+
53+
call "%VCVARSALL%" x64
54+
55+
set "omp32dll=%VCToolsRedistDir%\x86\Microsoft.%VCTOOLSET%.OPENMP\vcomp140.dll"
56+
set "omp64dll=%VCToolsRedistDir%\x64\Microsoft.%VCTOOLSET%.OPENMP\vcomp140.dll"
57+
58+
if not exist "%omp32dll%" (
59+
echo vcomp140.dll [x86] not found, make sure to set VCTOOLSET or update this script
60+
exit /b 1
61+
)
62+
if not exist "%omp64dll%" (
63+
echo vcomp140.dll [x64] not found, make sure to set VCTOOLSET or update this script
64+
exit /b 1
65+
)
66+
67+
copy "%omp32dll%" "%builddir%\rel-win32-omp\msdfgen"
68+
copy "%omp64dll%" "%builddir%\rel-win64-omp\msdfgen"
69+
70+
if not exist "C:\Program Files\7-Zip\7z.exe" (
71+
echo 7-Zip not found, you have to package it manually
72+
exit /b 0
73+
)
74+
75+
pushd "%builddir%\rel-win32"
76+
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win32.zip" msdfgen
77+
cd msdfgen
78+
call example.bat
79+
popd
80+
pushd "%builddir%\rel-win32-omp"
81+
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win32-openmp.zip" msdfgen
82+
cd msdfgen
83+
call example.bat
84+
popd
85+
pushd "%builddir%\rel-win64"
86+
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win64.zip" msdfgen
87+
cd msdfgen
88+
call example.bat
89+
popd
90+
pushd "%builddir%\rel-win64-omp"
91+
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win64-openmp.zip" msdfgen
92+
cd msdfgen
93+
call example.bat
94+
popd
95+
96+
popd

0 commit comments

Comments
 (0)