Skip to content

Commit

Permalink
Text buffer size update, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inanevin committed Oct 22, 2022
1 parent d3bf082 commit 9a7bae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/Core/Text.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace LinaVG
/// <returns>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. </returns>

/// <summary>
/// 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.
Expand All @@ -125,7 +125,7 @@ namespace LinaVG
LINAVG_API FontHandle LoadFont(const char* file, bool loadAsSDF, int size = 48, GlyphEncoding* customRanges = nullptr, int customRangesSize = 0);

/// <summary>
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace LinaVG
rowh = 0;
}

const size_t bufSize = static_cast<size_t>(glyphWidth * glyphRows + 1);
const size_t bufSize = static_cast<size_t>(glyphWidth * glyphRows);

if (slot->bitmap.buffer != nullptr)
{
Expand Down

0 comments on commit 9a7bae6

Please sign in to comment.