-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix font family rendering error on Web env.
- Loading branch information
Showing
5 changed files
with
61 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,48 @@ | ||
export const defaultFontList = { | ||
windows: [ | ||
'Microsoft YaHei', | ||
'Microsoft JhengHei', | ||
'Hiragino Sans GB', | ||
'SimSun', | ||
'FangSong', | ||
'KaiTi', | ||
'NSimSun', | ||
'SimHei', | ||
'DengXian', | ||
'Adobe Song Std', | ||
'Adobe Fangsong Std', | ||
'Adobe Heiti Std', | ||
'Adobe Kaiti Std', | ||
'Times New Roman', | ||
'Comic Sans MS', | ||
'Courier New', | ||
'Calibri', | ||
'Impact', | ||
'Microsoft Sans Serif', | ||
'Symbol', | ||
'Tahoma', | ||
'Trebuchet MS', | ||
'Verdana', | ||
], | ||
cocoa: [ | ||
'PingFang SC', | ||
'Apple SD Gothic Neo', | ||
'Helvetica', | ||
'Myanmar Sangam MN', | ||
'Thonburi', | ||
'Mishafi', | ||
'Menlo', | ||
'Kailasa', | ||
'Kefa', | ||
'Kohinoor Telugu', | ||
'Hiragino Maru Gothic ProN', | ||
], | ||
}; | ||
import { IPHONE, MACOS } from './ua'; | ||
|
||
const windows = [ | ||
'Microsoft YaHei', | ||
'Microsoft JhengHei', | ||
'Hiragino Sans GB', | ||
'SimSun', | ||
'FangSong', | ||
'KaiTi', | ||
'NSimSun', | ||
'SimHei', | ||
'DengXian', | ||
'Adobe Song Std', | ||
'Adobe Fangsong Std', | ||
'Adobe Heiti Std', | ||
'Adobe Kaiti Std', | ||
'Times New Roman', | ||
'Comic Sans MS', | ||
'Courier New', | ||
'Calibri', | ||
'Impact', | ||
'Microsoft Sans Serif', | ||
'Symbol', | ||
'Tahoma', | ||
'Trebuchet MS', | ||
'Verdana', | ||
]; | ||
const cocoa = [ | ||
'PingFang SC', | ||
'Apple SD Gothic Neo', | ||
'Helvetica', | ||
'Myanmar Sangam MN', | ||
'Thonburi', | ||
'Mishafi', | ||
'Menlo', | ||
'Kailasa', | ||
'Kefa', | ||
'Kohinoor Telugu', | ||
'Hiragino Maru Gothic ProN', | ||
]; | ||
|
||
export const defaultFontNames = (() => { | ||
if (MACOS || IPHONE) { | ||
return ['emoji'].concat(...cocoa); | ||
} else { | ||
return ['emoji'].concat(...windows); | ||
} | ||
})(); |