We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very great library! Thanks!
There is a problem with scaling vertical text. The fix might look something like
void AddTextVertical(ImDrawList *DrawList, const char *text, ImVec2 pos, ImU32 text_color) { pos.x = IM_ROUND(pos.x); pos.y = IM_ROUND(pos.y); ImFont* font = GImGui->Font; ImGuiContext& g = *GImGui; IM_ASSERT(font->FontSize > 0.0f); const float scale = g.FontSize / font->FontSize; const ImFontGlyph *glyph; for (char c = *text++; c; c = *text++) { glyph = font->FindGlyph(c); if (!glyph) continue; DrawList->PrimReserve(6, 4); DrawList->PrimQuadUV( pos + ImVec2(glyph->Y0, -glyph->X0) * scale, pos + ImVec2(glyph->Y0, -glyph->X1) * scale, pos + ImVec2(glyph->Y1, -glyph->X1) * scale, pos + ImVec2(glyph->Y1, -glyph->X0) * scale, ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V0), ImVec2(glyph->U1, glyph->V1), ImVec2(glyph->U0, glyph->V1), text_color); pos.y -= glyph->AdvanceX * scale; } }
Thanks.
The text was updated successfully, but these errors were encountered:
Can you post a picture of what is happening?
Sorry, something went wrong.
The vertical text does not respond to scaling changes.
Thanks, I just pushed a fix for scaling and offset:
No branches or pull requests
Very great library! Thanks!
There is a problem with scaling vertical text. The fix might look something like
Thanks.
The text was updated successfully, but these errors were encountered: