mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Fix tone-only signal changes, the first anchor step, row order and emoji widths
- A provider's Live Signals row now changes when only its tone does; fields are compared one by one instead of through a joined signature. - The frame that first sets an inertial subject's anchor puts it on the subject, so the view no longer jumps ahead after waiting for the floor. - The subject HUD drops vanished rows before it adds new ones, so TRACK ACQUIRED and a steady warning keep their place. - Progress labels give astral-plane glyphs such as emoji at least main's width, so they are not clipped.
This commit is contained in:
1 parent
c2f73cdc04
commit
a72c0ba237
8 files changed
+171
-31
No files matched your search
@@ -159,3 +159,22 @@ test('a CJK stop name gets the width its full-width glyphs need', () => {
|
||||
assert.equal(estimateProgressLabelPx({ text: 'CENTRAL' }), 7 * 6.4 + 8);
|
||||
assert.equal(estimateProgressLabelPx({ text: 'カタカナ' }), 4 * 6.4 + 8);
|
||||
});
|
||||
|
||||
test('emoji and other astral glyphs in a progress label get at least 1 em each', () => {
|
||||
// About 1 em in 10 px type, 0.06 em apart.
|
||||
const emPx = 10 + 0.6;
|
||||
for (const [text, needPx] of [
|
||||
['🚉🚆🚇🚋', 4 * emPx],
|
||||
['🚆'.repeat(8), 8 * emPx],
|
||||
// Supplementary kana, outside the full-width ranges.
|
||||
['𛀁𛀂', 2 * emPx],
|
||||
// Mixed: four emoji, a space and two full-width glyphs.
|
||||
['🚆🚇🚌🚕 乗換', 4 * emPx + 6.4 + 2 * emPx],
|
||||
]) {
|
||||
const givenPx = estimateProgressLabelPx({ text, detail: '' });
|
||||
assert.ok(
|
||||
givenPx >= needPx + 8,
|
||||
`${text}: ${givenPx} px given, about ${needPx} px needed`,
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user