![]() |
|
![]() |
| Back in the days of HTML 4.01 there was the idea of an align attribute where possible numerical data could auto-align on a specified character:
https://www.w3.org/TR/html401/struct/tables.html#h-11.3.2HTML 4 was still in this weird in-between time where there were styling attributes in HTML coexisting with the upcoming CSS. Afair no browser ever implemented character alignment and in Google’s HTML it is only written up as obsolete: https://html.spec.whatwg.org/multipage/obsolete.html#dom-tab... Styling in general is of course a CSS thing – but thinking about it arranging alignment in multiple interdependent elements is a problem which not just need a property but a layout algorithm which browsers then need to implement. So we still don’t have nice things. > It occurs to me that contextual alternates could make this Just Work. The replacement mechanism in OpenType fonts is surprisingly useful. I remember Apple’s San Francisco font switches between different variants of the colon if it follows text characters ("my proposal: nuke it from the orbit") or if it exists between numbers as in a time ("23:52"); in the latter it is more centered. |
![]() |
| I suppose one way to make it work in CSS would be to split the numbers on the decimal points, and align the parts as necessary. Though there's no way to get around the / soup, unfortunately.
| |
![]() |
| >you need the plus and minus signs to be the same width
I've never thought about it, but that is somewhat annoying that the math symbols aren't a consistent width with each other. |
![]() |
| Also U+2012 FIGURE DASH (for things like phone numbers), and probably U+2212 MINUS SIGN (aligned with plus). Everyone usually defaults to hyphen-minus though, and all bets are off. |
![]() |
| Set thy eyes on this excellent Font, for Inſtance: https://en.m.wikipedia.org/wiki/Georgia_(typeface)#/media/Fi...
As can be moſt clearly ſeen, the Numerals are not of equale Height, but poſſeſs Deſcendants, like the 4, and Aſcendants, like the 6. Shouldſt thou deſire to embelliſh thy Layout with ſuch a Rendition of Numerals, thou canst: https://developer.mozilla.org/en-US/docs/Web/CSS/font-varian... This Feature requireth though that the Font ſo employed containéd the proper Variants of the numeral Glyphs. Many a diſtinguished Font do. (Pray note that the -th Ending of Verbs is for Singular Third Perſon Form, not to be uſed with "thou". I do, thou dost, he doth.) |
![]() |
| Caveat: Google Fonts, and by extension Fontsource which mostly just mirrors Googles files, strips out nearly all of the advanced OpenType features to reduce the filesize. It's worth checking the upstream version of your font to see which features it actually offers.
e.g. Wakamai Fondue lists 11 features for Googles version of Inter (some essential ones plus fractions, tabular numbers, numerators, denominators and contextual alts), while the full fat version of Inter has a whopping 44 features (too many to list, see https://rsms.me/inter/). |
![]() |
| Yeah, I'm waiting to see if BM condensed ever arrives. I am thinking it won't. I don't think it would take this long if they really intended to get v2 out the door. It's vaporware. |
![]() |
| Not really related: to get VSCode to support comments, jsdocs, other syntax highlighting features using different fonts, you will probably have to use the extension vscode-custom-css from be5invis: https://github.com/be5invis/vscode-custom-css
Mine is:
Which looks like the last picture in this comment: https://github.com/microsoft/vscode/issues/36512#issuecommen...Just be prepared to experiment a lot, VSCode's (Electron's?) font handling is buggy. Why are font features so difficult to support correctly? |
![]() |
| If you like typography, check out Butterick's Practical Typography: https://practicaltypography.com/ It's full of good, pragmatic advice on how to make printed and digital documents look wonderful.
I've bought two fonts from him and his font license is easily the most permissive of any paid professional font I've seen: no restrictions on the number of page views or anything, unlike most other pro fonts. Are his fonts open source? No. Are there good open source fonts? Of course. But are his fonts beautiful? You bet. I've got Valkyrie and Concourse. Concourse is particularly flexible when it comes to contextual alternatives and such. |
![]() |
| Also Recursive (https://www.recursive.design) which has the usual weight and slant axis, with cursive alternates which can be toggled explicitly or used automatically when the slant is strong enough, but also a monospace axis (which allows for semi-monospace) and a "casual" axis which changes the whole character of the font.
|
![]() |
| Loading a font can cause multiple things including load time delay. For example, connecting to Google and downloading a Lato font is around 4-5 requests + js + CSS files + 500kb added download.
Processing the font itself also is at least 500ms to a second depending on the device type. We keep the total requests under 25, which cannot be done after multiple 3rd party fonts are added. Additionally, some fonts can introduce CLS (content layout shift) after the font is loaded. Especially H tags because they shift a lot. CLS = your SEO is dead. For speed purposes, especially mobile, using a 3rd party font is SEO suicide. The sites we build for our clients are below 1.2 second mobile and 0.2 second desktop load time which gives these sites an enormous SEO advantage. These load times are complete loads, not initial draws or TTFBs. (results are provided by Google page speed insights - https://pagespeed.web.dev/) These load times change when we use the client's own fonts or the ones they pick from Google fonts. We have this discussion almost every time we onboard a new client. |
Or things like showing a clock, countdown, whatever. A time that "jumps around" on the screen from one second to the next annoys the hell out of me...