- Movable, resizable floating objects and a shared 104-preset shape gallery across Docs, Sheets, and Slides - Sheets Insert menu: screenshot capture, recommended charts, and an icon library - Slides: Home slideshow module and slideshow-exit fixes - Docs: track-changes fixes (IME input, tracked-deletion re-deletion) and Word-parity font handling - Redact secret-looking tokens from outgoing AI messages (community contribution from PR #32, hardened with narrower patterns and tests) - Linux packaging: AppImage and deb download instructions Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
46 lines
1010 B
TypeScript
46 lines
1010 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { isEastAsianFontName } from '../src/renderer/font-list'
|
|
|
|
describe('isEastAsianFontName', () => {
|
|
it('classifies CJK families across naming conventions', () => {
|
|
for (const f of [
|
|
'KaiTi',
|
|
'SimSun',
|
|
'宋体',
|
|
'楷体_GB2312',
|
|
'仿宋',
|
|
'微软雅黑',
|
|
'等线',
|
|
'方正小标宋简体',
|
|
'PingFang SC',
|
|
'Microsoft YaHei',
|
|
'Yu Mincho',
|
|
'MS Gothic',
|
|
'Malgun Gothic',
|
|
'Batang',
|
|
'Microsoft JhengHei',
|
|
'PMingLiU',
|
|
'Noto Sans CJK SC',
|
|
'Source Han Serif',
|
|
]) {
|
|
expect(isEastAsianFontName(f), f).toBe(true)
|
|
}
|
|
})
|
|
|
|
it('classifies Latin families as non-East-Asian', () => {
|
|
for (const f of [
|
|
'Times New Roman',
|
|
'Arial',
|
|
'Calibri',
|
|
'Cambria',
|
|
'Georgia',
|
|
'Courier New',
|
|
'Segoe UI',
|
|
'Consolas',
|
|
'Garamond',
|
|
]) {
|
|
expect(isEastAsianFontName(f), f).toBe(false)
|
|
}
|
|
})
|
|
})
|