CanScan
Loading...
Searching...
No Matches
fr.softsf.canscan.util.FontManagerUTest Class Reference

Unit test suite for typography and scaling management via FontManager. More...

Collaboration diagram for fr.softsf.canscan.util.FontManagerUTest:

Package Functions

void givenDefaultFont_whenInitializeLuciole_thenDefaultFontIsReplaced ()
 Verifies that the manager initialization correctly replaces the system font with Luciole.
void givenLargeFont_whenGetScaledDimension_thenReturnLargerValue ()
 Verifies scaling with a large font to simulate HiDPI/Windows Scaling.
void givenNullFont_whenGetScaledDimension_thenUseFallbackMetrics ()
 Verifies that the calculation handles the fallback font if UIManager is cleared.
void givenStandardFont_whenGetScaledDimension_thenReturnSameValue ()
 Verifies that getScaledDimension returns the base value when font height matches reference.
void setUp ()
 Resets the UI default font before each test to ensure a clean state.

Detailed Description

Unit test suite for typography and scaling management via FontManager.

Member Function Documentation

◆ givenDefaultFont_whenInitializeLuciole_thenDefaultFontIsReplaced()

void fr.softsf.canscan.util.FontManagerUTest.givenDefaultFont_whenInitializeLuciole_thenDefaultFontIsReplaced ( )
package

Verifies that the manager initialization correctly replaces the system font with Luciole.

Here is the call graph for this function:

◆ givenLargeFont_whenGetScaledDimension_thenReturnLargerValue()

void fr.softsf.canscan.util.FontManagerUTest.givenLargeFont_whenGetScaledDimension_thenReturnLargerValue ( )
package

Verifies scaling with a large font to simulate HiDPI/Windows Scaling.

Here is the call graph for this function:

◆ givenNullFont_whenGetScaledDimension_thenUseFallbackMetrics()

void fr.softsf.canscan.util.FontManagerUTest.givenNullFont_whenGetScaledDimension_thenUseFallbackMetrics ( )
package

Verifies that the calculation handles the fallback font if UIManager is cleared.

Here is the call graph for this function:

◆ givenStandardFont_whenGetScaledDimension_thenReturnSameValue()

void fr.softsf.canscan.util.FontManagerUTest.givenStandardFont_whenGetScaledDimension_thenReturnSameValue ( )
package

Verifies that getScaledDimension returns the base value when font height matches reference.

Here is the call graph for this function:

◆ setUp()

void fr.softsf.canscan.util.FontManagerUTest.setUp ( )
package

Resets the UI default font before each test to ensure a clean state.


The documentation for this class was generated from the following file: