feat(shared): add getPretextFontString formatter
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
} from 'vitest';
|
||||
import { getPretextFontString } from './getPretextFontString';
|
||||
|
||||
describe('getPretextFontString', () => {
|
||||
it('formats weight, px size and quoted family for pretext/canvas', () => {
|
||||
expect(getPretextFontString(400, 48, 'Inter')).toBe('400 48px "Inter"');
|
||||
});
|
||||
it('preserves fractional sizes and quotes multi-word family names', () => {
|
||||
expect(getPretextFontString(700, 12.5, 'PT Serif')).toBe('700 12.5px "PT Serif"');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user