mirror of
https://github.com/danbulant/cushy
synced 2026-07-05 11:10:34 +00:00
Attempting to tweak glyph calculation
This commit is contained in:
parent
4c9dd5d7ca
commit
b33e06ac4e
1 changed files with 1 additions and 4 deletions
|
|
@ -881,9 +881,6 @@ where
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make relative be relative to the center of the glyph for a nearest search.
|
|
||||||
let relative = relative + rect.size / 2;
|
|
||||||
|
|
||||||
let line_height = cache.measured.line_height.get();
|
let line_height = cache.measured.line_height.get();
|
||||||
if relative.y < 0 || relative.y >= line_height {
|
if relative.y < 0 || relative.y >= line_height {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -897,7 +894,7 @@ where
|
||||||
)
|
)
|
||||||
.saturating_abs();
|
.saturating_abs();
|
||||||
let cursor = Cursor {
|
let cursor = Cursor {
|
||||||
offset: if relative.x <= rect.size.width / 3 {
|
offset: if dbg!(relative.x) <= rect.size.width / 3 {
|
||||||
glyph.info.start
|
glyph.info.start
|
||||||
} else {
|
} else {
|
||||||
glyph.info.end
|
glyph.info.end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue