Skip to content
New issue

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

Improve the heuristics of the bold broken check #74

Merged
merged 1 commit into from
Jun 12, 2015

Conversation

chris-morgan
Copy link
Contributor

Putting a span straight in body is not a good check because it will only
succeed for a monospaced body font, where the monospace font selection
is more likely to be placed on .terminal. For better realism still,
I’ve put it as a span inside a div inside a div.terminal, which matches
what the real terminal will do, so it should be as sound a check as can
be done short of doing it on the actual terminal (though quite frankly I
don’t see why we don’t just do that).

Putting a span straight in body is not a good check because it will only
succeed for a monospaced body font, where the monospace font selection
is more likely to be placed on `.terminal`. For better realism still,
I’ve put it as a span inside a div inside a div.terminal, which matches
what the real terminal will do, so it should be as sound a check as can
be done short of doing it on the actual terminal (though quite frankly I
don’t see why we don’t just do that).
@chjj
Copy link
Owner

chjj commented Jun 12, 2015

Hmm, I figured non-monospace fonts would still increase the scrollWidth when boldened in broken browsers. Is this not the case for some browsers? It seems to work in practice.

edit: Nevermind, I see what you're getting at. This is probably better.

chjj added a commit that referenced this pull request Jun 12, 2015
Improve the heuristics of the bold broken check
@chjj chjj merged commit 7d38ef1 into chjj:master Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants