Readit News logoReadit News
krono commented on Modern Font Stacks   modernfontstacks.com/... · Posted by u/surprisetalk
leephillips · 3 months ago
That is clearly not the intention, else there would be no reason to bother with font stacks. The intention is to list a set of ranked preferences, implemented as fallbacks, that best express the designer’s vision for the site, while avoiding font downloading. In your example, presumably the designer thinks that Consolas works better than JetBrains Mono NL.
krono · 3 months ago
Yes, I see what you mean, but if that's really the intent, then having only this font-family rule isn't sufficient. For that argument/reasoning to hold up, it would have to be accompanied by metrics adjustments to compensate for the massive differences between some of the listed fonts in these stacks.
krono commented on Modern Font Stacks   modernfontstacks.com/... · Posted by u/surprisetalk
reaperducer · 3 months ago
they just throw a bunch of common typeface names at the wall and they can't even tell what sticks because it's so random.

Anytime someone on HN doesn't understand CSS, they throw up their hands and call it random. Just because you don't understand what's happening doesn't mean it's random.

I don't understand the SAM76 programming language, but I don't pretend that

  !%ii,*,1,1,!%mu,*,%F,%su,*,1//////////=
is "random."

the user might have a prefered fallback font set that they prefer over any of the ones in the font stack

Great! Then the user gets his preferred font, as requested, instead of the one the page specified. Sounds like a win, so I'm not sure what you're complaining about. I expect you'd also complain if the web page overrode the user's choice.

I disagree with the notion that common browser configuration options available for users to change through the main/general browser settings UI would in any way be esoteric.

Of the six billion or so people on the web, the number of people manually overriding fonts isn't even a rounding error. It's not even a rounding error's rounding error. Get out of the tech bubble.

krono · 3 months ago
Oh you flatterer!

My top level comment was not a complaint at all, but rather a heads-up regarding the potentially unexpected or often misunderstood effects of applying these font stacks, accompanied by a practical example, and a personal recommendation with my reasoning.

Now, please, don't be so hostile. It's nasty and makes you come across as a lot more stupid than I believe you really are.

krono commented on Modern Font Stacks   modernfontstacks.com/... · Posted by u/surprisetalk
leephillips · 3 months ago
Your example is instructive, but I fail to see what the problem is. This is working as intended, no?
krono · 3 months ago
It already works as intended. If the intent is to render a default system font, then let the system handle that by simply applying 'monospace'.
krono commented on Modern Font Stacks   modernfontstacks.com/... · Posted by u/surprisetalk
tln · 3 months ago
I don't think web pages should stay away from font stacks just to handle people with changed esoteric browser prefs. If you as a user want to see different fonts everywhere, you'll need invasive tools that block font face etc. Or Firefox (where this message comes from) has a setting to "Allow pages to choose their own fonts, instead of your selections above"
krono · 3 months ago
These font stacks don't handle anything at all, they just throw a bunch of common typeface names at the wall and they can't even tell what sticks because it's so random. All the while, the user might have a prefered fallback font set that they prefer over any of the ones in the font stack - and even if that isn't the case, simply using 'monospace' as the only fallback will render the default monospace font anyway.

I disagree with the notion that common browser configuration options available for users to change through the main/general browser settings UI would in any way be esoteric. It is wholly irrelevant anyway.

The setting you mention has no effect in the case I outlined above - Even with "Allow pages to choose their own fonts, instead of your selections above." enabled, the same results are observed.

krono commented on Modern Font Stacks   modernfontstacks.com/... · Posted by u/surprisetalk
krono · 3 months ago
An example of something to keep in mind with this technique is that you might actually end up causing the browser to render a different font than either you or the user intended.

For a practical example:

Environment

  - Latest Firefox on Windows 10.
  - Manually installed fonts 'Cascadia Code' and 'JetBrains Mono NL'.
  - Firefox default 'monospace' font set to 'JetBrains Mono NL'.

Setting `font-family: monospace;` would end up rendering 'JetBrains Mono NL' - the user-configured default monospace font.

Setting `font-family: 'Cascadia Code', monospace;` would also render 'JetBrains Mono NL' - privacy features prevent pages from querying non-standard system fonts and this will also be reflected as a console warning message: 'Request for font "Cascadia Mono" blocked at visibility level 2 (requires 3)".'

Now, if you were to use he "Monospace Code" font stack listed on this page `font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;`, you will render... Yup, 'Consolas'!

  1. `ui-monospace` - remains unsupported by Firefox which is lame (would also render 'Consolas').

  2. `Cascadia Code` - see above, access denied because it isn't natively available on Windows 10 (also, coding ligatures... more like illigatures, amirite?).

  3. `Source Code Pro` - skipped due to unavailability.

  4. `Menlo` - skipped due to unavailability.

  5. `Consolas` - next option in line, this one is available and is the one that will be chosen.

  6. `DejaVu Sans Mono`  - skipped, font already determined.

  7. `monospace` - skipped, font already determined.

These modern font stacks suck. Please, if you want to render font and it has to be something specific, then use an actual web font and simply fall back to the default 'monospace' which is controlled by the user.

Deleted Comment

krono commented on Show HN: Browser MCP – Automate your browser using Cursor, Claude, VS Code   browsermcp.io/... · Posted by u/namuorg
namuorg · 9 months ago
Browser MCP uses the Chrome DevTools Protocol (CDP) to automate the browser so it currently only works for Chromium-based browsers.

Unfortunately, Firefox doesn't expose WebDriver BiDi (the standardized version of CDP) to browser extensions AFAIK (someone please correct me if I'm mistaken!), so I don't think I can support it even if I tried.

krono · 9 months ago
Just found this[0] implementation roadmap on Mozilla's wiki, recently updated too! At least it's actively being worked on.

Not going to lie, this makes me happy.

[0]: https://wiki.mozilla.org/WebDriver/RemoteProtocol/WebDriver_...

krono commented on An update on Google's compliance with the DMA   blog.google/around-the-gl... · Posted by u/evilsaloon
whatio · a year ago
A petulant child does not explain the negative consequences of what he is being asked to do using metrics and specific stakeholder feedback.

It does not help consumers to have outside parties run roughshod over businesses. Regulations are necessary, but to be effective, they must be measured, in both senses of the word. To be implemented carefully, they must be subject to criticism, even by the party being regulated.

Do you have any specific concerns with the points raised by Google here?

krono · a year ago
I think it's highly disingenuous of you to claim that the regulators in question are acting without any plan or purpose even if those might not be immediately clear. "If you don't like how the table is set, turn over the table."

Deleted Comment

Deleted Comment

u/krono

KarmaCake day3504July 2, 2017
About
Software developer by choice, manager through happenstance, and salesman out of necessity

If you don't stand for something, you'll fall for anything.

View Original