Score:0

Why is text width while using FONTCONFIG_PATH are always rounded

ru flag

I am running chrome and chromium and behavior remains same both browsers.

If I don't set FONTCONFIG_PATH environment variable for the browser process, I see floating point numbers such as 136.2060546875. If I set FONTCONFIG_PATH, I get rounded numbers such as 136, no fractional part. Using following Javascript to get the width

const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
ctx.font = 'sans-serif';
let tm = ctx.measureText("hello world");
console.log(tm.width);

Why do I always get rounded numbers while using FONTCONFIG_PATH? Fonts are available and config path is correct.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.