Această pagină nu este încă în limba dumneavoastră. Citiți textul în engleză.
Blog
Fonts give the system away twice: list and generic family
Echipa ARMANOS7 min
A page asks about fonts twice
Both use one trick: the page draws a test string and measures how wide it came out. It asks no permission and leaves you no trace.
The first answers an easy question: do you have Menlo. The second a harder one: what does your system put behind the word cursive.
- 1
Draws a test string
The same string is set in one font after another.
- 2
Measures the width
Every font has a width of its own, and that is a number already.
- 3
Compares with the fallback
A width equal to the fallback means you lack that font.
The name list betrays the system
A set of fonts builds up on a machine by itself: an office suite, a design tool and games each leave some behind. Two accounts whose sets match letter for letter get paired faster than two sharing an exit address.
A Windows profile claims 14 fonts always, with another 18 held in reserve from which the draw takes about half; a macOS profile has 15 always and 20 in reserve. So the length of the list differs between two of your profiles, and the sets part on their own.
One foreign font in that list undoes the whole arrangement. A profile that claims Windows and admits Menlo or Papyrus describes a machine nobody ever shipped.
Which fonts a profile always has
The core of a Windows profile is fourteen names that stand on any live Windows: Arial, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana and six more. Four of the fourteen back the generic families: Comic Sans MS, Impact, Cambria Math and Consolas.
Eighteen optional ones arrive by lot: Calibri, Cambria, Candara, Garamond, Century Gothic, Arial Black and others, and the lot's threshold is 55 out of 100. So two Windows profiles differ in list length by themselves, and two identical lists are rarer than two identical addresses.
| Profile system | Always present | Arrive by lot |
|---|---|---|
| Windows | 14 | 18 |
| macOS | 15 | 20 |
| Linux | 21 | 17 |
The second name of one font
On a Mac a font carries a second name, short and technical: Arial answers to ArialMT as well. Font lookup on macOS works that way, and a live Mac answers both names alike.
Measured on the finished engine: Arial gave 898.76, and nine second names gave 850.62 each, the fallback width exactly.
A profile where Arial is present and ArialMT is missing looks like no real Mac.
So second names exist for 24 families on macOS, but they reach a list together with the family itself: twelve of those twenty-four sit in the core and arrive with it, the other twelve arrive by draw. A Windows profile carries no second names: Windows looks fonts up by family and knows no technical names.
Generic families are the second measure
Besides a name, a page can ask for a family: serif, sans-serif, monospace, cursive, fantasy or math. A live machine answers all six with different fonts, and the widths differ too.
Measured on 18 August: on a Mac a macOS profile gave four different widths for four families. A Windows profile on the same Mac collapsed all four into one.
| Family | macOS profile on a Mac | Windows profile on a Mac |
|---|---|---|
| serif | 840.66 | 840.66 |
| cursive | 842.34 | 840.66 |
| fantasy | 742.05 | 840.66 |
| math | 894.11 | 840.66 |
Why four widths collapse into one
The word cursive is not a font but an errand: turning it into one is the job of the system you sit at. On a Mac cursive opens into Apple Chancery, fantasy into Papyrus, math into STIX Two Math.
A Windows profile claims none of those three, so each is turned away into the fallback. Three families settle onto the width of serif, and one measurement shows a machine that does not exist.
What closes this seam
The browser reads the family mapping out of the profile settings, and that folder is yours. So the seam closes without a rebuild: each family gets a font the profile already claims.
After that write the four widths parted again: the families are backed by fonts of the HOST system, which on a Mac means Apple Chancery, Papyrus and STIX Two Math, while Comic Sans MS and Impact belong to the Windows row.
The app does this for a foreign template only: your own system opens the families correctly by itself.
Assigning blindly is the one thing to avoid here. A font your machine lacks closes one impossible machine and opens another: monospace collapses instead of cursive.
Letters draw while the list stays clean
For letters to appear at all, the browser needs fonts from the machine you sit at. Without them a foreign template draws a blank page: text width is zero for every family at once.
So the engine draws with host fonts and answers the page from the profile’s list. The backing used for drawing stays out of the answer, and the question of what you have installed is answered by the profile.
A phone's list is short on purpose
Android really has few fonts, and that is the first thing by which a phone gives itself away. The desktop set is not there at all: a page that measures the width of Arial and gets an answer already knows it is not looking at a phone.
So a phone profile declares a short list: Roboto, Noto Sans, Noto Serif, Droid Sans Mono and a few others. Its generic families are its own: cursive resolves to Dancing Script, monospace to Droid Sans Mono, and nobody has a maths font on a phone, so math honestly lands on serif.
How to check your profiles tonight
You can take both measurements yourself, and nothing needs installing. Open the developer console inside a profile and measure one string in six families in a row.
Then check the second name: ask for Arial and separately for ArialMT. A real Mac answers both alike; a Windows profile admits no technical name at all.
- 1
Measure six families
One string, six widths: widths that match each other are the seam.
- 2
Ask for the second name
On a macOS profile Arial and ArialMT must answer alike.
- 3
Match the list to the system
A font the claimed system never ships has no business in the list.
- 4
Repeat on the next profile
Two sets that match letter for letter get paired by a platform.
What this does not claim
- It does not claim that four different widths make a profile safe. One seam out of many is closed; behaviour, payment details and account history stay with you.
- The numbers above were taken on 18 August, on one machine and one fingerprint generation. Another set of fonts gives other widths.
- Families are assigned for a foreign template only, and they come from a built-in table keyed by the name of your system rather than from asking the disk. There is one check: the font has to be on the profile’s list. If the write fails you get a warning. If there was nothing to assign, the families stay as they were and nothing is said.
- It does not claim that every site takes this measurement. Some do, some never look, and none publish what they check.
Where you can see this yourself
Every number above comes out of code you can open and run.
- A profile font list comes from its seed: a core plus some optional ones
- packages/shared/src/index.js
- Second names are added only where the system answers them
- packages/shared/src/index.js
- Generic families go to a foreign template only, and only from claimed fonts
- apps/desktop/src/lib/genericFonts.js · apps/desktop/test/generic-fonts.js
- Six families give six different fonts in a real browser on every template
- apps/desktop/test/engine-text-renders.js
- The page is answered from the clean profile list, not the host fonts
- apps/desktop/test/дыры-движка-закрыты.js
- The refusal of a foreign font sits in the engine itself
- engine/patches/armanos-fp.cumulative.diff
Questions
- Can I just swap the user agent string?
- No: the font list and the generic family are read separately from it. Swapping one field more often adds a mismatch than removes one.
- Would claiming more fonts be better?
- No. A generous list looks odd by itself, and one name from a foreign system gives the seam away at once.
- Why not give every profile one set?
- A set that matches letter for letter ties your accounts together more firmly than any address. Sets have to part from profile to profile.
- I am on a Mac with a Mac profile, is this moot?
- Your own system opens the families correctly, and there is nothing to assign. The widths are still worth a look: the font list is your own.
- Does incognito or a blocker help here?
- No. The width is measured right where you are, without a single request leaving, so there is nothing to block.
- How long does one profile take?
- Both take a couple of minutes in the console. Walking profiles in pairs takes longer; a dozen an evening is a calm pace.
Next to this
Font fingerprint
How a page walks the names and what one set tells it.
What a fingerprint is made of
Every reading that must agree with the others inside one machine.
Fingerprint and its editor
What you can change by hand and what changing it costs.
Free fingerprint check
12 values read in your browser, with nothing sent anywhere.
See which fonts your browser names
The check reads 12 values right in the window and sends nothing anywhere.