Go to the source code of this file.
|
| | TEST (ImageDataTest, CreateGlyphBitmapStatic) |
| | TEST (ImageDataTest, CreateGlyphBitmap) |
| | TEST (ImageDataTest, CreateTextBitmap1) |
| | TEST (ImageDataTest, CreateTextBitmap2) |
◆ TEST() [1/4]
| TEST |
( |
ImageDataTest | , |
|
|
CreateGlyphBitmap | ) |
Definition at line 29 of file text_renderer_tests.cpp.
30{
31 std::string const pathToFont{ "../Content/Fonts/Exo/Exo-Medium.otf" };
32
34
35 auto imageData = std::make_shared<ImageData>( textRenderer.CreateGlyphBitmap('4') );
36 imageData->WritePngFile("testGlyphBitmap.png");
37
38 EXPECT_NE(imageData, nullptr);
39}
◆ TEST() [2/4]
| TEST |
( |
ImageDataTest | , |
|
|
CreateGlyphBitmapStatic | ) |
Definition at line 19 of file text_renderer_tests.cpp.
20{
21 std::string const pathToFont{ "../Content/Fonts/Exo/Exo-Medium.otf" };
22
24 imageData->WritePngFile("testGlyphStatic.png");
25
26 EXPECT_NE( imageData, nullptr );
27}
ImageData CreateGlyphBitmap(char const character)
◆ TEST() [3/4]
| TEST |
( |
ImageDataTest | , |
|
|
CreateTextBitmap1 | ) |
Definition at line 41 of file text_renderer_tests.cpp.
42{
43 std::string const pathToFont{ "../Content/Fonts/Pirulen/pirulen_rg.otf" };
44
46
47 std::string testText{"This is Pirulen font test text 123 string"};
48 auto imageData = std::make_shared<ImageData>( textRenderer.CreateStringBitmap(testText) );
49 imageData->WritePngFile("testPirulenFontTextString.png");
50
51 EXPECT_NE(imageData, nullptr);
52}
◆ TEST() [4/4]
| TEST |
( |
ImageDataTest | , |
|
|
CreateTextBitmap2 | ) |
Definition at line 54 of file text_renderer_tests.cpp.
55{
56 std::string const pathToFont{ "../Content/Fonts/DigitalDream/DIGITALDREAM.ttf" };
57
59
60 std::string testText{ "This_is_DIGITAL-DREAM_font_test_text_123_string" };
61 auto imageData = std::make_shared<ImageData>( textRenderer.CreateStringBitmap(testText) );
62 imageData->WritePngFile("testDigitalDreamFontTextString.png");
63
64 EXPECT_NE(imageData, nullptr);
65}