-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add builing.md * move soirce files to src * add about dialog. * add README details. * update wrong link.
- Loading branch information
Showing
27 changed files
with
302 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Building font-render-tester | ||
|
||
## Requirements | ||
|
||
__Font-Render-Tester__ is written in C++ and the build script is set to expect C++23 level of feature set. At the moment only [Visual Studio 2022](https://visualstudio.microsoft.com/) is extensively compiled against. If you are using other compilers and have issues with, please feel free to report an issue or submit a pull request. | ||
|
||
In order to compile with __Visual Studio 2022__, it must be setup with C++ features. Make sure to install __Desktop development with C++__ workload. | ||
|
||
This project requires [CMake](https://cmake.org/) and [VCPKG Library Manager](https://github.com/microsoft/vcpkg). Please follow the installation instruction of each tools. | ||
|
||
Also, the environment `VCPKG_ROOT` is needed and it should point to the root directory of __VCPKG__ (eg. `c:\vcpkg`) | ||
|
||
## Building with IDE | ||
|
||
### Visual Studio Code | ||
Microsoft's [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) Extension is recommended. | ||
|
||
You should be able to open the project in Visual Studio Code and it will automatically setup anything needed, given that you have the C++ extension installed. | ||
|
||
Upon the configure step at the first, the IDE will ask for the configure preset to use. Please select the `default` preset as it will setup build to use __VCPKG__. | ||
|
||
### Visual Studio 2022 | ||
|
||
In __Visual Studio 2022__, use `Open a local folder` or `File->Open->Folder...` in order to open the project. | ||
|
||
Upon opening the project, __Visual Studio__ will configure the project. This includes downloading any dependencies the project needs. | ||
|
||
After the configure step is done, you should be able to run or debug the project right away. | ||
|
||
## Building with command line | ||
|
||
1. Change directory into the source directory. | ||
2. Run the following command: | ||
```sh | ||
$ cmake --preset=default | ||
``` | ||
This will create a build directory call `build` and configure the project inside that directory. | ||
|
||
The configuring process includes downloading dependencies from the __VCPKG__ repository and building those dependencies. This will take a while. | ||
3. To build the project, run the following command: | ||
```sh | ||
$ cmake --build ./build --config=Release | ||
``` | ||
|
||
The executable files, along with required dll files and font files will be created at `<source_dir>/build/Release`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,56 @@ | ||
# font-render-tester | ||
# Font-Render-Tester | ||
|
||
__Font-Render-Tester__ is a tool that shows previews of text in a given font and different settings. It | ||
supports font features like __font size__ and font variations (font width, weight, etc.). You can also | ||
turns on and off OpenType shaping to see how the give text would render with specific OpenType settings | ||
like __direction__, __script__ and __language__. | ||
|
||
__Font-Render-Tester__ also shows some of the basic font metrics information like __Ascend__ or __Decend__. | ||
|
||
Also, you can change fonts imediately from the list make it's quite useful to preview differnt font files. | ||
|
||
__Font-Render-Tester__ is written in modern C++ and uses FreeType2 for glyph rendering and Harfbuzz for | ||
OpenType shaping. | ||
|
||
## Motivations | ||
|
||
On my personal website, I'm maintaining a small list of games that support Thai and how they perform in | ||
that regards. I need to create screenshot to shows how Thai text should looks like comparing to the actual | ||
text in game. At first I was using Microsoft Word for that task. Later on I wants to learn more on how to | ||
properly implement the text rendering so I created my own tool. | ||
|
||
Also in my game engine, I need to specify the settings of the font metrics I'm using instead of reading | ||
the value from the font file. Since the tool can shows some basic font metrics value, I can use this to | ||
choose the font I'm going to use along with its metrics values. | ||
|
||
## Usage | ||
|
||
At the first run, the application works on its own font directory (the one used on the GUI). You can | ||
change the font directory by choose menu `File->Change font directory`. | ||
|
||
![Change Directory](doc/README/change_directory.webp) | ||
|
||
Once the font directory is set you can start playing with the toolbar on the right hand side. | ||
|
||
![Change font/font size](doc/README/change_font_size.webp) | ||
|
||
You can play with OpenType text shaping, either enable or disable. For my use I usually uses it to find if | ||
font can render Thai correctly when either text shaping is off or on, and when it's on does it need the | ||
specific algorithm for the language or not. | ||
|
||
![Toggle OpenType shaping](doc/README/opentype.webp) | ||
|
||
You can also change the text direction in certains lanuage, like vertical text in Japanese. | ||
|
||
__Notes__: screenshot contains lyrics from the song [_Sakura Iro Mau Koro_ by _Mika Nakashima_](https://www.youtube.com/watch?v=DZ_Ww5oCLPI) ℗2005 Sony Music Labels Inc. | ||
|
||
![Change text direction](doc/README/change_direction.webp) | ||
|
||
For variable fonts, you can change any of the 5 common axis, depends on whether or not the axis is | ||
supported by the given font. | ||
|
||
__Notes__: screenshot contains lyrics from the song | ||
[_Slow Dancing in a Burning Room_ by _John Mayer_(https://www.youtube.com/watch?v=5MkfBNl_3pw) | ||
℗2006 Aware Records LLC. | ||
|
||
![Variable Font](doc/README/variable_font.webp) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.