mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 11:23:48 +00:00
committed by
Konstantin Pastbin
parent
a28d5d15ce
commit
2aaf37e9ee
@@ -240,9 +240,9 @@ FreetypeError constexpr g_FT_Errors[] =
|
||||
auto const & currPos = glyphPos[i];
|
||||
|
||||
auto const & metrics = m_fontFace->glyph->metrics;
|
||||
auto const xOffset = (currPos.x_offset + static_cast<int32_t>(metrics.horiBearingX)) >> 6;
|
||||
auto const xOffset = static_cast<int32_t>((currPos.x_offset + metrics.horiBearingX) >> 6);
|
||||
// The original Drape code expects a bottom, not a top offset in its calculations.
|
||||
auto const yOffset = (currPos.y_offset + static_cast<int32_t>(metrics.horiBearingY) - metrics.height) >> 6;
|
||||
auto const yOffset = static_cast<int32_t>((currPos.y_offset + metrics.horiBearingY - metrics.height) >> 6);
|
||||
int32_t const xAdvance = currPos.x_advance >> 6;
|
||||
// yAdvance is always zero for horizontal text layouts.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user