feat: render Calibri Light with the bundled Carlito
Word's default theme heading font, so every Word file with a Title or a heading references it. Without a face it dropped to the browser's serif — a serif heading at the wrong width.
This commit is contained in:
1 parent
3a71491b58
commit
869556e531
2 files changed
+25
No files matched your search
@@ -203,6 +203,7 @@ export function cssFontFamily(name: string): string {
|
||||
export const DEFAULT_SINGLE_LINE_HEIGHT = 1.15;
|
||||
const SINGLE_LINE_HEIGHT: Record<string, number> = {
|
||||
Calibri: 1.2208,
|
||||
'Calibri Light': 1.2208,
|
||||
Carlito: 1.2208,
|
||||
'Courier New': 1.1333,
|
||||
'Liberation Mono': 1.1333,
|
||||
|
||||
@@ -88,6 +88,30 @@
|
||||
src: local('Calibri Bold Italic'), local('Carlito Bold Italic'), url('../assets/fonts/Carlito-BoldItalic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Calibri Light → Carlito. Word's default theme heading font; Carlito has no light
|
||||
cut, so LibreOffice renders it with the regular one too. */
|
||||
@font-face {
|
||||
font-family: 'Calibri Light';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local('Calibri Light'), local('Carlito'), url('../assets/fonts/Carlito-Regular.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Calibri Light';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: local('Calibri Light'), local('Carlito Bold'), url('../assets/fonts/Carlito-Bold.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Calibri Light';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local('Calibri Light Italic'), local('Carlito Italic'), url('../assets/fonts/Carlito-Italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Arial → Liberation Sans */
|
||||
@font-face {
|
||||
font-family: 'Arial';
|
||||
|
||||
Reference in new issue
Block a user