Skip to content

Commit

Permalink
sadasd
Browse files Browse the repository at this point in the history
  • Loading branch information
Robyt3 committed Jul 29, 2023
1 parent e81e9f6 commit e028981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engine/client/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,14 @@ class CGlyphMap

vec2 Kerning(const SGlyph *pLeft, const SGlyph *pRight) const
{
FT_Vector Kerning = {0, 0};
if(pLeft != nullptr && pRight != nullptr && pLeft->m_Face == pRight->m_Face && pLeft->m_FontSize == pRight->m_FontSize)
{
FT_Vector Kerning = {0, 0};
FT_Set_Pixel_Sizes(pLeft->m_Face, 0, pLeft->m_FontSize);
FT_Get_Kerning(pLeft->m_Face, pLeft->m_Chr, pRight->m_Chr, FT_KERNING_DEFAULT, &Kerning);
return vec2(Kerning.x >> 6, Kerning.y >> 6);
}
return vec2(Kerning.x >> 6, Kerning.y >> 6);
return vec2(0.0f, 0.0f);
}

void UploadEntityLayerText(void *pTexBuff, size_t ImageColorChannelCount, int TexWidth, int TexHeight, int TexSubWidth, int TexSubHeight, const char *pText, int Length, float x, float y, int FontSize)
Expand Down

0 comments on commit e028981

Please sign in to comment.