Fixed naming convention mistakes

This commit is contained in:
Radek Dutkiewicz 2021-01-21 13:31:18 +00:00 committed by Lukas Dürrenberger
parent e7ae462c82
commit 88451a0740
2 changed files with 8 additions and 8 deletions

View File

@ -52,8 +52,8 @@ public:
// Member data
////////////////////////////////////////////////////////////
float advance; //!< Offset to move horizontally to the next character
int lsb_delta; //!< Left offset after forced autohint. Internally used by getKerning()
int rsb_delta; //!< Right offset after forced autohint. Internally used by getKerning()
int lsbDelta; //!< Left offset after forced autohint. Internally used by getKerning()
int rsbDelta; //!< Right offset after forced autohint. Internally used by getKerning()
FloatRect bounds; //!< Bounding rectangle of the glyph, in coordinates relative to the baseline
IntRect textureRect; //!< Texture coordinates of the glyph inside the font's texture
};

View File

@ -391,10 +391,10 @@ float Font::getKerning(Uint32 first, Uint32 second, unsigned int characterSize,
FT_UInt index2 = FT_Get_Char_Index(face, second);
// Retrieve position compensation deltas generated by FT_LOAD_FORCE_AUTOHINT flag
float firstRsbDelta = getGlyph(first, characterSize, bold).rsb_delta;
float secondLsbDelta = getGlyph(second, characterSize, bold).lsb_delta;
float firstRsbDelta = getGlyph(first, characterSize, bold).rsbDelta;
float secondLsbDelta = getGlyph(second, characterSize, bold).lsbDelta;
// Get the kerning vector
// Get the kerning vector if present
FT_Vector kerning;
kerning.x = kerning.y = 0;
if (FT_HAS_KERNING(face))
@ -410,7 +410,7 @@ float Font::getKerning(Uint32 first, Uint32 second, unsigned int characterSize,
}
else
{
// Invalid font, or no kerning
// Invalid font
return 0.f;
}
}
@ -632,8 +632,8 @@ Glyph Font::loadGlyph(Uint32 codePoint, unsigned int characterSize, bool bold, f
if (bold)
glyph.advance += static_cast<float>(weight) / static_cast<float>(1 << 6);
glyph.lsb_delta = face->glyph->lsb_delta;
glyph.rsb_delta = face->glyph->rsb_delta;
glyph.lsbDelta = face->glyph->lsb_delta;
glyph.rsbDelta = face->glyph->rsb_delta;
int width = bitmap.width;
int height = bitmap.rows;