Skip to content

Commit e74f23b

Browse files
authored
Merge pull request #8 from RV1989/Tahoma
Added Tahoma font
2 parents 26cefcb + cc82b97 commit e74f23b

File tree

4 files changed

+576
-2
lines changed

4 files changed

+576
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Supported fonts:
2929
- Trebuchet MS
3030
- Verdana
3131
- Webdings
32+
- Tahoma
3233

3334
Example
3435
------------

__tests__/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ test('test basic with bold italic', () => {
2323
test('test basic with different font', () => {
2424
expect(index('test string', { font: 'impact' })).toBe(420);
2525
expect(index('test string', { font: 'impact', size: 10 })).toBe(42);
26+
expect(index('test string', { font: 'tahoma', size: 10 })).toBe(44.300000000000004);
2627
});
2728

2829
test('test diacritic', () => {

src/pixelWidthCalculator.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
'Trebuchet MS',
2121
'Verdana',
2222
'Webdings',
23-
'Open Sans'
23+
'Open Sans',
24+
'Tahoma'
2425
]
2526

2627
function checkFont(name) {

0 commit comments

Comments
 (0)