Start font reading support.

This commit is contained in:
jmsgrogan 2022-07-31 20:01:13 +01:00
parent 92e7a78710
commit ed925afabf
22 changed files with 599 additions and 220 deletions

View file

@ -10,7 +10,9 @@ target_include_directories(test_utils PUBLIC
list(APPEND TestFiles
audio/TestAudioWriter.cpp
audio/TestMidiReader.cpp
core/TestBinaryStream.cpp
database/TestDatabase.cpp
fonts/TestFontReader.cpp
graphics/TestOpenGlRendering.cpp
graphics/TestRasterizer.cpp
ipc/TestDbus.cpp
@ -26,7 +28,9 @@ list(APPEND TestFiles
list(APPEND TestNames
TestAudioWriter
TestMidiReader
TestBinaryStream
TestDatabase
TestFontReader
TestOpenGlRendering
TestRasterizer
TestDbus
@ -46,9 +50,9 @@ link_directories(${DBUS_LIBRARY_DIRS})
foreach(TestFile TestName IN ZIP_LISTS TestFiles TestNames)
add_executable(${TestName} ${TestFile})
target_link_libraries(${TestName} PUBLIC core network image publishing video database geometry audio graphics web client test_utils ${DBUS_LIBRARIES})
target_link_libraries(${TestName} PUBLIC core fonts network image publishing video database geometry audio graphics web client test_utils ${DBUS_LIBRARIES})
endforeach()
add_executable(test_runner test_runner.cpp)
target_link_libraries(test_runner PUBLIC core network database geometry audio graphics web client)
target_link_libraries(test_runner PUBLIC core fonts network database geometry audio graphics web client)

View file

@ -0,0 +1,4 @@
int main()
{
return 0;
}

View file

@ -0,0 +1,17 @@
#include "TrueTypeFont.h"
#include "FontReader.h"
#include <iostream>
int main()
{
const auto font_path = "/usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf";
FontReader reader;
reader.setPath(font_path);
auto font = reader.read();
font->dumpInfo();
return 0;
}