Skip to content
This repository was archived by the owner on Nov 7, 2021. It is now read-only.

Fix undersized glyph bounding boxes for click support #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Typogenic/Scripts/TypogenicText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,7 @@ float BlitString(string str, float cursorX, float cursorY, List<int> vertexPoint
// Only need to store glyph bounds if click support is enabled.
if (EnableClickSupport)
{

// Click bounds for glyphs are based on allocated space, not rendered space.
// Otherwise we'll end up with unclickable dead zones between glyphs.
r.width = glyph.xAdvance * Size;
// And Y coordinates are just not handled the same at all.
// Y coordinates are just not handled the same at all.
r.y = -cursorY - r.height - glyph.yOffset * Size;


Expand Down