diff options
author | talha <talha@talhaamir.xyz> | 2024-06-21 00:33:35 +0500 |
---|---|---|
committer | talha <talha@talhaamir.xyz> | 2024-06-21 00:33:35 +0500 |
commit | 8824908b696278f34891d95c15e519710ea0d18d (patch) | |
tree | f08522791a6ec89b531317c5ad3b551cca9c3e74 | |
parent | ba43db84ce7e80449c505c1381b33786cc047131 (diff) |
Setup font loading on linux
-rw-r--r-- | assets/fonts/Roboto.ttf | bin | 0 -> 168260 bytes | |||
-rwxr-xr-x | build.sh | 2 | ||||
-rwxr-xr-x | libs/freetype/libfreetype.so | bin | 0 -> 3467256 bytes | |||
-rw-r--r-- | source/main.cpp | 2 |
4 files changed, 2 insertions, 2 deletions
diff --git a/assets/fonts/Roboto.ttf b/assets/fonts/Roboto.ttf Binary files differnew file mode 100644 index 0000000..ddf4bfa --- /dev/null +++ b/assets/fonts/Roboto.ttf @@ -11,7 +11,7 @@ include_opts="-I $include_path" files="source/main.cpp $include_path/glad/glad.c" build_opts="$build_dir/main" -lib_path="lib/SDL2" +lib_path="libs/SDL2 libs/freetype/libfreetype.so" link_opts="-L $lib_path -lSDL2" build_command="clang++ -std=c++11 -g -Og $include_opts $files $link_opts -o $build_opts" diff --git a/libs/freetype/libfreetype.so b/libs/freetype/libfreetype.so Binary files differnew file mode 100755 index 0000000..89774b8 --- /dev/null +++ b/libs/freetype/libfreetype.so diff --git a/source/main.cpp b/source/main.cpp index 6df5451..3458820 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -378,7 +378,7 @@ int main(int argc, char* argv[]) return -1; } - FT_Error error = FT_New_Face(ft_lib, "assets/fonts/Arial.ttf", 0, &face); + FT_Error error = FT_New_Face(ft_lib, "assets/fonts/Roboto.ttf", 0, &face); if (error == FT_Err_Unknown_File_Format) { printf("Error: Font Loading Failed. The font format is unsupported.\n"); |