3 ms·
Can someone smarter than me explain what this is for? (I've read https://github.com/Hydrock/AhemFont https://github.com/Hydrock/AhemFont and https://hydrock.git
by CharlesW 4y ago
Can someone smarter than me explain what this is for? (I've read https://github.com/Hydrock/AhemFont https://github.com/Hydrock/AhemFont and https://hydrock.github.io/AhemFont/ https://hydrock.github.io/AhemFont/.)
- bombcar 4y agoI suppose you use it when you're adjusting things to "look right" and need to know how big the character space actually is (then you replace it with the real font you want to use)?
- re 4y agoFor writing portable, reliable tests for web browsers. > The web-platform-tests project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software which is compatible with other implementations, and that later implementations will be compatible with their implementations. https://web-platform-tests.org/ https://web-platform-tests.org/ > Tests should be as cross-platform as reasonably possible, working across different devices, screen resolutions, paper sizes, etc. ... Fonts cannot be relied on to be either installed or to have specific metrics. As such, in most cases when a known font is needed, Ahem should be used and loaded as a web font. In other cases, @font-face should be used. https://web-platform-tests.org/writing-tests/general-guidelines.html#be-cross-platform https://web-platform-tests.org/writing-tests/general-guideli...
- pdpi 4y agoProduction-quality fonts usually have huge amounts of tweaks and fine-tuning to make them look good. Characters won’t be exactly the same height, they’ll be a bit above or below their nominal position, that sort of thing. Those tweaks also make those fonts completely useless as reference for developers. What this font gives you is a bunch of boxes and lines with well-defined, predictable sizes and positions, which makes it very easy to validate that your text rendering/layout is at least somewhat sane.