An OpenType typeface utilities.
Перейти к файлу
Wiesław Šoltés acf9135ee9 Update TypefaceUtil.sln 2020-07-02 23:59:50 +02:00
.github Added github configs 2020-07-02 09:04:21 +00:00
src Added printFontFamilies 2020-07-02 10:58:22 +00:00
unicode Create UnicodeDataGenerator.csproj 2020-07-02 23:59:39 +02:00
.gitattributes Initial commit 2020-06-30 00:17:35 +02:00
.gitignore Initial commit 2020-06-30 00:17:35 +02:00
LICENSE.TXT Updated docs 2020-07-02 06:19:12 +00:00
README.md Added printFontFamilies 2020-07-02 10:58:22 +00:00
TypefaceUtil.sln Update TypefaceUtil.sln 2020-07-02 23:59:50 +02:00

README.md

TypefaceUtil

CI

NuGet NuGet

GitHub release Github All Releases Github Releases

An OpenType typeface utilities.

About

TypefaceUtil is a set of OpenType typeface utilities. Currently supported are cmap table format parser for character to glyph index mapping, generation of character png map, svg and xaml export for glyphs.

Usage

TypefaceUtil:
  An OpenType typeface utilities.

Usage:
  TypefaceUtil [options]

Options:
  -f, --inputFiles <inputfiles>              The relative or absolute path to the input files
  -d, --inputDirectory <inputdirectory>      The relative or absolute path to the input directory
  -p, --pattern <pattern>                    The search string to match against the names of files in the input directory [default: *.ttf]
  --fontFamily <fontfamily>                  The input font family
  -o, --outputDirectory <outputdirectory>    The relative or absolute path to the output directory
  --printFontFamilies                        Print available font families
  --printCharacterMaps                       Print character maps info
  --png, --pngExport                         Export text as Png
  --pngTextSize <pngtextsize>                Png text size [default: 20]
  --pngCellSize <pngcellsize>                Png cell size [default: 40]
  --pngColumns <pngcolumns>                  Png number of columns [default: 20]
  --svg, --svgExport                         Export text as Svg
  --svgTextSize <svgtextsize>                Svg text size [default: 16]
  --svgPathFill <svgpathfill>                Svg path fill [default: black]
  --xaml, --xamlExport                       Export text as Xaml
  --xamlTextSize <xamltextsize>              Xaml text size [default: 16]
  --xamlBrush <xamlbrush>                    Xaml brush [default: Black]
  --quiet                                    Set verbosity level to quiet
  --version                                  Show version information
  -?, -h, --help                             Show help and usage information
TypefaceUtil -h
TypefaceUtil --pngExport -f segoeui.ttf
TypefaceUtil --pngExport --fontFamily "Segoe UI"
TypefaceUtil --svgExport -f seguisym.ttf
TypefaceUtil --svgExport --fontFamily "Segoe UI Symbol"
TypefaceUtil --xamlExport -f calibri.ttf
TypefaceUtil --xamlExport --fontFamily "Calibri"
TypefaceUtil -d C:\Windows\Fonts -o export --png --svg --xaml

Testing

dotnet run -c Release -- --help
dotnet run -c Release -- --pngExport --svgExport --xamlExport -d ../../../ --pngColumns 20 --pngTextSize 50 --pngCellSize 70 --svgTextSize 22 --svgPathFill "#000000" --xamlTextSize 22 --xamlBrush "#FF000000"
dotnet run -c Release -- --pngExport --svgExport --xamlExport --fontFamily "system"
dotnet run -c Release -- --pngExport --svgExport --xamlExport -f ../../../segoeui.ttf
dotnet run -c Release -- --pngExport --svgExport --xamlExport -f ../../../seguisym.ttf
dotnet run -c Release -- --pngExport --svgExport --xamlExport -f ../../../calibri.ttf
dotnet run -c Release -- --pngExport --svgExport --xamlExport -f ../../../segoeui.ttf --pngColumns 20 --pngTextSize 50 --pngCellSize 70
dotnet run -c Release -- --pngExport --svgExport --xamlExport --fontFamily "Segoe UI"
dotnet run -c Release -- --pngExport --svgExport --xamlExport --fontFamily "Segoe UI Symbol"
dotnet run -c Release -- --pngExport --svgExport --xamlExport --fontFamily "Calibri"

References

License

TypefaceUtil is licensed under the MIT license.