13 ms·
Is there such a thing as a web-safe font?
- kome 2y agoI think the W3C or somebody else should make Arial and Times New Roman standard and open source.
- trinix912 2y agoDoesn't Microsoft hold all rights to Arial because they didn't want to license Helvetica? I don't think W3C has much say in that.
- albert_e 2y agoWe could make say Helvetica Libre and Times Free Roman
- amarshall 2y agoThey already exist, but of course aren’t exactly the same https://en.wikipedia.org/wiki/GNU_FreeFont https://en.wikipedia.org/wiki/GNU_FreeFont
- zokier 2y agoLiberation/Croscore fonts are more relevant here because they are designed to be drop-in replacements (metrically compatible) for MS fonts. https://en.wikipedia.org/wiki/Liberation_fonts https://en.wikipedia.org/wiki/Liberation_fonts https://en.wikipedia.org/wiki/Croscore_fonts https://en.wikipedia.org/wiki/Croscore_fonts
- amarshall 2y agoThat’s actually what I was looking for, but I forgot the name and was on mobile—thanks!
- f33d5173 2y agoThe gpl makes those completely useless for such a purpose.
- TingPing 2y agoIt uses a variant of the GPL. You can include it in any usage as a font, just modifications of the actual font are normal GPL.
- vFunct 2y agoThere really should be a set of a few hundred fonts standardized by the w3c or whatwg that should come with every browser (and OS) install. This would be like how early versions of PostScript came with about 30 standard fonts available to all PostScript printers.
- fleabitdev 2y agoIt's a nice thought, but internationalisation would make that difficult. On my system, the Noto international font weighs about 170 MiB compressed (gzip-compressed TTF, sans and serif styles, all weights, including symbols and colour emoji). Even just focusing on Latin scripts, a few hundred fonts would roughly double the compressed download size for browsers and Electron apps. It might be possible to come up with a better compression scheme which exploits redundancy between different typefaces, but as far as I know, that tech doesn't exist yet.
- kibwen 2y agoHere in the grim darkness of the future, every install of a general-purpose OS better be shipping with at least one font (or collection of fonts that operate via glyph fallback) to cover every Unicode codepoint for every language that isn't extinct yet. (In other words, apps that expect to be used with any arbitrary language, including browsers, should not be forced to ship with a font just to ensure basic coverage). And then, once you have that system-provided codepoint coverage, you can make your font parametric in order to avoid needing to ship multiple copies of the font for different styles. It's not a perfect solution, but it's still pretty acceptable given the constraints.
- fleabitdev 2y agoTo provide fonts for N different scripts would multiply the file size by roughly N, and there are a lot of scripts in common use: https://en.wikipedia.org/wiki/List_of_writing_systems#/media/File:Writing_systems_worldwide.svg https://en.wikipedia.org/wiki/List_of_writing_systems#/media... Variable fonts would help, but I don't think it would be enough, especially if the goal is to provide a wide selection of fonts.
- mpol 2y agoThere is the system font that you can use: font-family: 'system-ui', sans-serif; System fonts and font rendering are now so good for readability, that you don't need anything else. I use it on one website where I don't care about pixel-perfect. In cases where the customer/owner wants a pixel-perfect layout, this will not work.
- keybits 2y agohttps://modernfontstacks.com/ https://modernfontstacks.com/ is a great resource for more detail on this and useful suggestions for font stacks that have a similar style across platforms.
- dvh 2y agoI've been writing "font-family: sans-serif" when I wanted user preferred font without serifs and "monospace" for user preferred monospace font. Is that not the correct way?
- singpolyma3 2y agoIndeed you are doing it correctly
- kragen 2y agoYes, those are web-safe fonts.
- tobr 2y agoDepends heavily on what you mean with ”user preferred”. Approximately 0% of users will have made an active choice on what sans-serif typeface they prefer.
- wruza 2y agoI tried to change browser defaults before, but that made some sites look strange because developer’s assumptions about defaults were merged with the design. Today when I want to change the font, I just add a per-site StyleBot rule.
- deleted 2y ago[deleted]
- anshumankmr 2y agoYes. It's comic sans :)
- JodieBenitez 2y agoserif, sans-serif, monospace There, you have it, and it's perfect.
- seydor 2y agoYes, verdana
- slater 2y agoWe do not say the 'v' word, here.
- ss64 2y agoThe whole point of a font stack is to give a prioritised selection between beautiful modern fonts that won't be available on every machine and basic standard defaults like 'sans-serif' that will.
- efitz 2y agoThe web is backwards. Designers and web site operators spend ridiculous amounts of engineering trying to control what users see, with the limitation that they have no control (other than exclusion) over what software the users chooses to view the content. HTML went way too far IMO, trying not only to represent the structure of information, but ALSO trying to solve the layout problem. It will never happen, but I long for a web where layout and content are disassociated. Where content is structured, requested by clients, delivered by servers, and then the client chooses the layout. Blind? Terminal only? Compute limited? No problem, use an agent that works for you. But big content wants CONTROL. They want to control what you see, how you see it, and what the preconditions are. They also want the web to be an application platform (that they can control, of course, and not have to deal with Apple or Google or Microsoft) that is free to them and supports all their controls. <rant/>
- mikae1 2y agoSeems it shouldn't be impossible for a new type of browser to restructure and present content in a matter that suits the user if the markup is semantic. A lynx for the modern age?
- rcarmo 2y agoKind of ironic that the heading font takes enough time to load that there is a flash and the layout shifts around. I have long decided to skip web fonts altogether and go with a) Georgia and b) a fallback font stack that suggests a couple of similar alternatives that are common across operating systems and falls back to standard defaults.