Fonttik is a text size & contrast checking solution created by PQI Tech to check accessibility criteria regarding text readability
C++
69
12 commits
updated Dec 3, 2025
Fonttik is a console application and library created by EA that processes images and videos highlighting text that meets and does not meet desired criteria. The guidelines checked by Fonttik ensure text has a minimum size relative to screen resolution or DPI and that it has sufficient luminance contrast against its background, according to desired criteria, to be readable or more likely to be readeable by color vision deficient people. Fonttik is not intended to guarantee, certify or otherwise validate an image or video's compliance with legal, regulatory or other requirements.
Fonttik has been created as a CMake project and can be compiled in any C++ compatible system. There are various subprojects, all of them compile their necessary inter-project dependencies as well:
All of the dependencies for Fonttik are specified in vcpk.json. vcpkg is a cross-platform package manager for C++ developed by Microsoft. Installation instructions for vcpkg can be found in its repository.
If you want CMake to automatically run vcpkg and compile all dependencies for you, you must set your VCPKG root folder as an environment variable called "VCPKG_ROOT" or add it as a variable in the CMakePresets.json.
Fonttik uses cmake presets to build with different configurations, e.g.
>cmake --preset windows-release
>cmake --build --preset windows-release
Note: There are some CUDA presets that allow to build OpenCV with hardware acceleration. To be able to use CUDA you will need an NVidia GPU and their compilers, for more information you can read the OpenCV docs on the topic.
More presets can be added to the CMakePresets.json file or defined in a CMakeUserPresets.json file.
Build options:
When executing Fonttik you must input the path to where the media you want to analyze is. You can either specify a folder, in which case every piece of media in the folder and subfolders will be analyzed, or a file, in which case that specific image will be analyzed.
Example of execution command when the terminal is running in Fonttik's directory
>FonttikApp.exe ./resources/bf2042/chat_window_closed.png
Fonttik would proceed to analyze the file 'chat_window_closed.png' with the configuration you specified beforehand. The filepath can be relative to where you are executing Fonttik or absolute (for example an absolute path pointing to your documents would be C:\Users[YourUserName]\Documents)
While Fonttik is analyzing an image it outputs the results it finds while operating through the console. If any text box doesn't pass the size or contrast checks it is notified and its position and detected values are output. At the end of the analysis an overall pass or fail result is decided for both size and contrast checks. These results are also written to a log file at the end.
For a more human-friendly output, Fonttik also outputs two images (one for contrast and another for size checks with all of the text boxes detected overlaid. These text boxes will be red if they fail or green if they pass by default. If the user has decided they want to use recommended values for checks, textboxes will be orange if they pass the minimum requirement but don't meet the recommended criteria. The colors can be customised by changing TextboxOutlineColors in the configuration file.
If you have activated the printValuesOnResults option in the configuration, you'll see the detected value for each check next to its corresponding text box in the image.
Results will be saved depending on the appsetting options enabled (explained in Configuration) and will be stored in the same location as the media analysed.
When running Fonttik the following optional arguments can be passed to alter the functionality of the tool:
-c: Specify configuration file. Given a path to a specific configuration file uses that one during this execution. By default Fonttik looks for config.json in its own folder.-a: Store results as the analysis runs asynchronouslyFonttik now includes colorblindness filters that simulate how text may appear to users with a color vision deficiency. The filters support simulation of the three main types of color vision deficiency; Protanopia (red cone deficiency), Deuteranopia (green cone deficiency), Tritanopia (blue cone deficiency), in addition to a Grayscale filter. These filters are integrated into the image analysis process by default, but are not available for video analysis. Fonttik processes each image through each filter to generate contrast results for each filter type, showing the detected text boxes overlaid on the simulated versions of the original image. The colorblindness simulation is only applied to the contrast checks.
Fonttik can be configured by a .json file, default configuration provided under Data. Config is automatically copied over when building with CMake. You can also use a different configuration when running the application by using the -c option.
Fonttik is provided under the BSD 3 Clause License, see LICENSE for details.
Fonttik utilizes open source software, see NOTICE licenses and details.
Before you can contribute, EA must have a Contributor License Agreement (CLA) on file that has been signed by each contributor. You can sign here: CLA
C++
94.4%
CMake
5.6%
Fonttik is a text size & contrast checking solution created by PQI Tech to check accessibility criteria regarding text readability
C++
69
12 commits
updated Dec 3, 2025
Fonttik is a console application and library created by EA that processes images and videos highlighting text that meets and does not meet desired criteria. The guidelines checked by Fonttik ensure text has a minimum size relative to screen resolution or DPI and that it has sufficient luminance contrast against its background, according to desired criteria, to be readable or more likely to be readeable by color vision deficient people. Fonttik is not intended to guarantee, certify or otherwise validate an image or video's compliance with legal, regulatory or other requirements.
Fonttik has been created as a CMake project and can be compiled in any C++ compatible system. There are various subprojects, all of them compile their necessary inter-project dependencies as well:
All of the dependencies for Fonttik are specified in vcpk.json. vcpkg is a cross-platform package manager for C++ developed by Microsoft. Installation instructions for vcpkg can be found in its repository.
If you want CMake to automatically run vcpkg and compile all dependencies for you, you must set your VCPKG root folder as an environment variable called "VCPKG_ROOT" or add it as a variable in the CMakePresets.json.
Fonttik uses cmake presets to build with different configurations, e.g.
>cmake --preset windows-release
>cmake --build --preset windows-release
Note: There are some CUDA presets that allow to build OpenCV with hardware acceleration. To be able to use CUDA you will need an NVidia GPU and their compilers, for more information you can read the OpenCV docs on the topic.
More presets can be added to the CMakePresets.json file or defined in a CMakeUserPresets.json file.
Build options:
When executing Fonttik you must input the path to where the media you want to analyze is. You can either specify a folder, in which case every piece of media in the folder and subfolders will be analyzed, or a file, in which case that specific image will be analyzed.
Example of execution command when the terminal is running in Fonttik's directory
>FonttikApp.exe ./resources/bf2042/chat_window_closed.png
Fonttik would proceed to analyze the file 'chat_window_closed.png' with the configuration you specified beforehand. The filepath can be relative to where you are executing Fonttik or absolute (for example an absolute path pointing to your documents would be C:\Users[YourUserName]\Documents)
While Fonttik is analyzing an image it outputs the results it finds while operating through the console. If any text box doesn't pass the size or contrast checks it is notified and its position and detected values are output. At the end of the analysis an overall pass or fail result is decided for both size and contrast checks. These results are also written to a log file at the end.
For a more human-friendly output, Fonttik also outputs two images (one for contrast and another for size checks with all of the text boxes detected overlaid. These text boxes will be red if they fail or green if they pass by default. If the user has decided they want to use recommended values for checks, textboxes will be orange if they pass the minimum requirement but don't meet the recommended criteria. The colors can be customised by changing TextboxOutlineColors in the configuration file.
If you have activated the printValuesOnResults option in the configuration, you'll see the detected value for each check next to its corresponding text box in the image.
Results will be saved depending on the appsetting options enabled (explained in Configuration) and will be stored in the same location as the media analysed.
When running Fonttik the following optional arguments can be passed to alter the functionality of the tool:
-c: Specify configuration file. Given a path to a specific configuration file uses that one during this execution. By default Fonttik looks for config.json in its own folder.-a: Store results as the analysis runs asynchronouslyFonttik now includes colorblindness filters that simulate how text may appear to users with a color vision deficiency. The filters support simulation of the three main types of color vision deficiency; Protanopia (red cone deficiency), Deuteranopia (green cone deficiency), Tritanopia (blue cone deficiency), in addition to a Grayscale filter. These filters are integrated into the image analysis process by default, but are not available for video analysis. Fonttik processes each image through each filter to generate contrast results for each filter type, showing the detected text boxes overlaid on the simulated versions of the original image. The colorblindness simulation is only applied to the contrast checks.
Fonttik can be configured by a .json file, default configuration provided under Data. Config is automatically copied over when building with CMake. You can also use a different configuration when running the application by using the -c option.
Fonttik is provided under the BSD 3 Clause License, see LICENSE for details.
Fonttik utilizes open source software, see NOTICE licenses and details.
Before you can contribute, EA must have a Contributor License Agreement (CLA) on file that has been signed by each contributor. You can sign here: CLA
C++
94.4%
CMake
5.6%