diff --git a/CHANGELOG.md b/CHANGELOG.md index 61bc62800a2..e10f546a4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [next] - ci(): Add some prebuilt fabric in the dist folder [#10178](https://github.com/fabricjs/fabric.js/pull/10178) +- chore(): Add more generic font families to FabricText.genericFonts [#10167](https://github.com/fabricjs/fabric.js/pull/10167) ## [6.4.2] diff --git a/src/shapes/Text/Text.ts b/src/shapes/Text/Text.ts index ee62af76097..5f0e4049aa5 100644 --- a/src/shapes/Text/Text.ts +++ b/src/shapes/Text/Text.ts @@ -1790,12 +1790,24 @@ export class FabricText< return 1; } + /** + * List of generic font families + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name + */ static genericFonts = [ - 'sans-serif', 'serif', + 'sans-serif', + 'monospace', 'cursive', 'fantasy', - 'monospace', + 'system-ui', + 'ui-serif', + 'ui-sans-serif', + 'ui-monospace', + 'ui-rounded', + 'math', + 'emoji', + 'fangsong', ]; /* _FROM_SVG_START_ */