firefox: set font size for x-western fonts (#1976)

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Approved-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Approved-by: 0xda157 <da157@voidq.com>
Approved-by: Daniel Thwaites <danth@danth.me>
This commit is contained in:
Ian Holloway 2025-11-18 14:53:24 -05:00 committed by GitHub
parent 2877806a5e
commit 1581ff2bda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,6 +43,15 @@ mkTarget {
"font.name.monospace.x-western" = fonts.monospace.name;
"font.name.sans-serif.x-western" = fonts.sansSerif.name;
"font.name.serif.x-western" = fonts.serif.name;
# 4/3 factor used for pt to px;
# adding 0.5 before flooring for rounding as Firefox requires an int
"font.size.monospace.x-western" = builtins.floor (
(fonts.sizes.terminal * 4.0 / 3.0) + 0.5
);
"font.size.variable.x-western" = builtins.floor (
(fonts.sizes.applications * 4.0 / 3.0) + 0.5
);
};
});
}