8000
Skip to content

导出的PPT文件字体与html预览不一致 #22

Description

@chanfay-nj

想解决什么问题? / What problem are you trying to solve?

【问题现象】
导出的ppt字体、字号与html预览不一致。问题在 editable-pptx-browser.js 中的字体映射。导出 PPTX 时,所有网页字体都会回退到系统字体。
【问题根因】
问题在 editable-pptx-browser.js 中的字体映射。导出 PPTX 时,所有网页字体都会回退到系统字体:

Inter, Archivo, Space Grotesk, IBM Plex Sans → Arial
IBM Plex Mono, JetBrains Mono, Space Mono → Courier New
Newsreader, Caveat → Georgia
Anton → Impact

这些字体在 assets/vendor/fonts/ 目录下以 woff2 提供,但 Windows 系统没有安装,所以 PPTX 导出时全部用了 Arial
等系统字体替代。

需要安装的字体(5 个 Google Fonts):

  1. Inter (400/500/600/700/800/900)
  2. Archivo (400/500/600/700/800/900)
  3. Space Grotesk (300/400/500/600/700)
  4. IBM Plex Sans (200/300/400/500)
  5. IBM Plex Mono (200/300/400/500/600)
  6. Anton (400)
  7. JetBrains Mono (400/500/600)
  8. Caveat (400/600/700)

这些 woff2 文件是子集化的,不能直接安装为系统字体。最方便的方式是从 Google Fonts 下载完整 TTF 安装。

期望的功能形态(可选) / What would you like it to look like? (optional)

建议整理skill中内置字体的下载链接,方便用户安装,以便保证导出ppt与html预览的一致性。

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No pro 39F9 jects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0