Skip to content

Commit

Permalink
Version 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Chlumsky committed May 18, 2024
1 parent aa9478e commit 85e8b3d
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ output.png
render.png
CMakeUserPresets.json
out/
/all-in-one/
/build_xcode/
/cmake-gen.bat
/line-ending-check.bat
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@

## Version 1.12 (2024-05-18)

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

## Version 1.11 (2023-11-11)

- Reworked SVG parser, which now supports multiple paths and other shapes - requires Skia
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 - 2024 Viktor Chlumsky
Copyright (c) 2014 - 2024 Viktor Chlumsky

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
96 changes: 96 additions & 0 deletions build-release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
@echo off
setlocal
pushd "%~dp0"

if "%VCVARSALL%"=="" set "VCVARSALL=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"
if "%VCTOOLSET%"=="" set "VCTOOLSET=VC143"

if not exist "%VCVARSALL%" (
echo vcvarsall.bat not found, set VCVARSALL to its path
exit /b 1
)

if "%1"=="" (
echo No version specified, using current
set "version=current"
) else (
set "version=%1"
)
set "builddir=%~dp0\build\release-%version%"

if exist "%builddir%" (
echo Deleting contents of %builddir%
rd /s /q "%builddir%"
)

cmake --preset win32 -B "%builddir%\build-win32"
cmake --preset win32-omp -B "%builddir%\build-win32-omp"
cmake --preset win64 -B "%builddir%\build-win64"
cmake --preset win64-omp -B "%builddir%\build-win64-omp"

cmake --build "%builddir%\build-win32" --config Release
cmake --build "%builddir%\build-win32-omp" --config Release
cmake --build "%builddir%\build-win64" --config Release
cmake --build "%builddir%\build-win64-omp" --config Release

mkdir "%builddir%\rel-win32\msdfgen"
mkdir "%builddir%\rel-win32-omp\msdfgen"
mkdir "%builddir%\rel-win64\msdfgen"
mkdir "%builddir%\rel-win64-omp\msdfgen"

copy "%builddir%\build-win32\Release\msdfgen.exe" "%builddir%\rel-win32\msdfgen"
copy "%builddir%\build-win32-omp\Release\msdfgen.exe" "%builddir%\rel-win32-omp\msdfgen"
copy "%builddir%\build-win64\Release\msdfgen.exe" "%builddir%\rel-win64\msdfgen"
copy "%builddir%\build-win64-omp\Release\msdfgen.exe" "%builddir%\rel-win64-omp\msdfgen"

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"

copy "%builddir%\example.bat" "%builddir%\rel-win32\msdfgen"
copy "%builddir%\example.bat" "%builddir%\rel-win32-omp\msdfgen"
copy "%builddir%\example.bat" "%builddir%\rel-win64\msdfgen"
copy "%builddir%\example.bat" "%builddir%\rel-win64-omp\msdfgen"

call "%VCVARSALL%" x64

set "omp32dll=%VCToolsRedistDir%\x86\Microsoft.%VCTOOLSET%.OPENMP\vcomp140.dll"
set "omp64dll=%VCToolsRedistDir%\x64\Microsoft.%VCTOOLSET%.OPENMP\vcomp140.dll"

if not exist "%omp32dll%" (
echo vcomp140.dll [x86] not found, make sure to set VCTOOLSET or update this script
exit /b 1
)
if not exist "%omp64dll%" (
echo vcomp140.dll [x64] not found, make sure to set VCTOOLSET or update this script
exit /b 1
)

copy "%omp32dll%" "%builddir%\rel-win32-omp\msdfgen"
copy "%omp64dll%" "%builddir%\rel-win64-omp\msdfgen"

if not exist "C:\Program Files\7-Zip\7z.exe" (
echo 7-Zip not found, you have to package it manually
exit /b 0
)

pushd "%builddir%\rel-win32"
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win32.zip" msdfgen
cd msdfgen
call example.bat
popd
pushd "%builddir%\rel-win32-omp"
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win32-openmp.zip" msdfgen
cd msdfgen
call example.bat
popd
pushd "%builddir%\rel-win64"
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win64.zip" msdfgen
cd msdfgen
call example.bat
popd
pushd "%builddir%\rel-win64-omp"
"C:\Program Files\7-Zip\7z.exe" a "..\msdfgen-%version%-win64-openmp.zip" msdfgen
cd msdfgen
call example.bat
popd

popd

0 comments on commit 85e8b3d

Please sign in to comment.