diff --git a/include/Core/Text.hpp b/include/Core/Text.hpp index c3634d2..0d52f77 100644 --- a/include/Core/Text.hpp +++ b/include/Core/Text.hpp @@ -111,7 +111,7 @@ namespace LinaVG /// Font handle, store this handle if you like to use multiple fonts. You can pass the handle inside TextOptions to draw with a specific font. /// - /// Loads the given font & generates textures based on given size. + /// Loads the given font and generates textures based on given size. /// You can load the same font with different sizes to achieve varying text scales. /// Alternatively, you can use the scale modifier in TextOptions but it's not recommended to upscale. /// Best quality would be achieved by loading fonts with bigger sizes and scaling them down using TextOptions. @@ -125,7 +125,7 @@ namespace LinaVG LINAVG_API FontHandle LoadFont(const char* file, bool loadAsSDF, int size = 48, GlyphEncoding* customRanges = nullptr, int customRangesSize = 0); /// - /// Loads the given font & generates textures based on given size. + /// Loads the given font and generates textures based on given size. /// You can load the same font with different sizes to achieve varying text scales. /// Alternatively, you can use the scale modifier in TextOptions but it's not recommended to upscale. /// Best quality would be achieved by loading fonts with bigger sizes and scaling them down using TextOptions. diff --git a/src/Core/Text.cpp b/src/Core/Text.cpp index 3c996db..49e52cf 100644 --- a/src/Core/Text.cpp +++ b/src/Core/Text.cpp @@ -158,7 +158,7 @@ namespace LinaVG rowh = 0; } - const size_t bufSize = static_cast(glyphWidth * glyphRows + 1); + const size_t bufSize = static_cast(glyphWidth * glyphRows); if (slot->bitmap.buffer != nullptr) {