Google Chrome 在 PDF 中使用不正确的字体

Google Chrome 在 PDF 中使用不正确的字体

延续同样的问题– 由于代表不足,我无法在那里发表评论。从视觉上看,问题完全相同;不幸的是,接受的解决方案似乎已过时或不完整。

这个问题已经偶尔发生一段时间了;刷新页面通常可以解决它。然而,最近,这种解决方法似乎已经失效了。

所有包含文本的 PDF 均显示如下原始问题中的图片

这是原始 PDF

DirectWrite 不再能被禁用;禁用该功能的标志已于 2016 年某个时候被删除。

Windows 和 Chrome 都是最新的。重启也没用。这是个人笔记本电脑上的唯一帐户。清除 Chrome 的文件缓存没有任何作用,隐身模式(无扩展程序)也有同样的问题。完全删除 Chrome(包括数据)并重新安装只会弄乱我打开的标签历史记录,字体渲染没有任何变化。使用所需的扩展程序检查 Chrome 中的字体设置,什么也没显示——无论如何都重置为默认设置。

重建 Windows 字体缓存并不完全成功;即使停止字体服务后,即使使用 ExecTI 解决方法,我仍然无法删除某些文件。

对于我的字体,除了标准的 Windows 10 Home 软件包之外,我没有安装太多字体。下面是来自 regedit 的列表;查看后C:\Windows\Fonts我发现也没有出现任何视觉上的混乱 - 恢复了默认字体设置,根据语言设置取消隐藏字体。只有“8514oem Standard”显示在 Arial 之前,这显然是标准的 Windows 字体。

最后一次尝试检查字体;sfc /scannow导致

Windows Resource Protection did not find any integrity violations.

Edge 确实能正确呈现内容;我没有安装 Adob​​e 或其他 PDF 阅读器。

所以我有点没主意了。

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Arial (TrueType)"="arial.ttf"
"Arial Black (TrueType)"="ariblk.ttf"
"Arial Bold (TrueType)"="arialbd.ttf"
"Arial Bold Italic (TrueType)"="arialbi.ttf"
"Arial Italic (TrueType)"="ariali.ttf"
"Bahnschrift (TrueType)"="bahnschrift.ttf"
"Calibri (TrueType)"="calibri.ttf"
"Calibri Bold (TrueType)"="calibrib.ttf"
"Calibri Bold Italic (TrueType)"="calibriz.ttf"
"Calibri Italic (TrueType)"="calibrii.ttf"
"Calibri Light (TrueType)"="calibril.ttf"
"Calibri Light Italic (TrueType)"="calibrili.ttf"
"Cambria & Cambria Math (TrueType)"="cambria.ttc"
"Cambria Bold (TrueType)"="cambriab.ttf"
"Cambria Bold Italic (TrueType)"="cambriaz.ttf"
"Cambria Italic (TrueType)"="cambriai.ttf"
"Candara (TrueType)"="candara.ttf"
"Candara Bold (TrueType)"="candarab.ttf"
"Candara Bold Italic (TrueType)"="candaraz.ttf"
"Candara Italic (TrueType)"="candarai.ttf"
"Comic Sans MS (TrueType)"="comic.ttf"
"Comic Sans MS Bold (TrueType)"="comicbd.ttf"
"Comic Sans MS Bold Italic (TrueType)"="comicz.ttf"
"Comic Sans MS Italic (TrueType)"="comici.ttf"
"Consolas (TrueType)"="consola.ttf"
"Consolas Bold (TrueType)"="consolab.ttf"
"Consolas Bold Italic (TrueType)"="consolaz.ttf"
"Consolas Italic (TrueType)"="consolai.ttf"
"Constantia (TrueType)"="constan.ttf"
"Constantia Bold (TrueType)"="constanb.ttf"
"Constantia Bold Italic (TrueType)"="constanz.ttf"
"Constantia Italic (TrueType)"="constani.ttf"
"Corbel (TrueType)"="corbel.ttf"
"Corbel Bold (TrueType)"="corbelb.ttf"
"Corbel Bold Italic (TrueType)"="corbelz.ttf"
"Corbel Italic (TrueType)"="corbeli.ttf"
"Courier New (TrueType)"="cour.ttf"
"Courier New Bold (TrueType)"="courbd.ttf"
"Courier New Bold Italic (TrueType)"="courbi.ttf"
"Courier New Italic (TrueType)"="couri.ttf"
"Ebrima (TrueType)"="ebrima.ttf"
"Ebrima Bold (TrueType)"="ebrimabd.ttf"
"Franklin Gothic Medium (TrueType)"="framd.ttf"
"Franklin Gothic Medium Italic (TrueType)"="framdit.ttf"
"Gabriola (TrueType)"="Gabriola.ttf"
"Gadugi (TrueType)"="gadugi.ttf"
"Gadugi Bold (TrueType)"="gadugib.ttf"
"Georgia (TrueType)"="georgia.ttf"
"Georgia Bold (TrueType)"="georgiab.ttf"
"Georgia Bold Italic (TrueType)"="georgiaz.ttf"
"Georgia Italic (TrueType)"="georgiai.ttf"
"Impact (TrueType)"="impact.ttf"
"Ink Free (TrueType)"="Inkfree.ttf"
"Javanese Text (TrueType)"="javatext.ttf"
"Leelawadee UI (TrueType)"="leelawui.ttf"
"Leelawadee UI Bold (TrueType)"="leelauib.ttf"
"Leelawadee UI Semilight (TrueType)"="leeluisl.ttf"
"Lucida Console (TrueType)"="lucon.TTF"
"Lucida Sans Unicode (TrueType)"="l_10646.ttf"
"Malgun Gothic (TrueType)"="malgun.ttf"
"Malgun Gothic Bold (TrueType)"="malgunbd.ttf"
"Malgun Gothic SemiLight (TrueType)"="malgunsl.ttf"
"Microsoft Himalaya (TrueType)"="himalaya.ttf"
"Microsoft JhengHei & Microsoft JhengHei UI (TrueType)"="msjh.ttc"
"Microsoft JhengHei Bold & Microsoft JhengHei UI Bold (TrueType)"="msjhbd.ttc"
"Microsoft JhengHei Light & Microsoft JhengHei UI Light (TrueType)"="msjhl.ttc"
"Microsoft New Tai Lue (TrueType)"="ntailu.ttf"
"Microsoft New Tai Lue Bold (TrueType)"="ntailub.ttf"
"Microsoft PhagsPa (TrueType)"="phagspa.ttf"
"Microsoft PhagsPa Bold (TrueType)"="phagspab.ttf"
"Microsoft Sans Serif (TrueType)"="micross.ttf"
"Microsoft Tai Le (TrueType)"="taile.ttf"
"Microsoft Tai Le Bold (TrueType)"="taileb.ttf"
"Microsoft YaHei & Microsoft YaHei UI (TrueType)"="msyh.ttc"
"Microsoft YaHei Bold & Microsoft YaHei UI Bold (TrueType)"="msyhbd.ttc"
"Microsoft YaHei Light & Microsoft YaHei UI Light (TrueType)"="msyhl.ttc"
"Microsoft Yi Baiti (TrueType)"="msyi.ttf"
"MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB (TrueType)"="mingliub.ttc"
"Modern (All res)"="modern.fon"
"Mongolian Baiti (TrueType)"="monbaiti.ttf"
"MS Gothic & MS UI Gothic & MS PGothic (TrueType)"="msgothic.ttc"
"MV Boli (TrueType)"="mvboli.ttf"
"Myanmar Text (TrueType)"="mmrtext.ttf"
"Myanmar Text Bold (TrueType)"="mmrtextb.ttf"
"Nirmala UI (TrueType)"="Nirmala.ttf"
"Nirmala UI Bold (TrueType)"="NirmalaB.ttf"
"Nirmala UI Semilight (TrueType)"="NirmalaS.ttf"
"Palatino Linotype (TrueType)"="pala.ttf"
"Palatino Linotype Bold (TrueType)"="palab.ttf"
"Palatino Linotype Bold Italic (TrueType)"="palabi.ttf"
"Palatino Linotype Italic (TrueType)"="palai.ttf"
"Roman (All res)"="roman.fon"
"Script (All res)"="script.fon"
"Segoe MDL2 Assets (TrueType)"="segmdl2.ttf"
"Segoe Print (TrueType)"="segoepr.ttf"
"Segoe Print Bold (TrueType)"="segoeprb.ttf"
"Segoe Script (TrueType)"="segoesc.ttf"
"Segoe Script Bold (TrueType)"="segoescb.ttf"
"Segoe UI (TrueType)"="segoeui.ttf"
"Segoe UI Black (TrueType)"="seguibl.ttf"
"Segoe UI Black Italic (TrueType)"="seguibli.ttf"
"Segoe UI Bold (TrueType)"="segoeuib.ttf"
"Segoe UI Bold Italic (TrueType)"="segoeuiz.ttf"
"Segoe UI Emoji (TrueType)"="seguiemj.ttf"
"Segoe UI Historic (TrueType)"="seguihis.ttf"
"Segoe UI Italic (TrueType)"="segoeuii.ttf"
"Segoe UI Light (TrueType)"="segoeuil.ttf"
"Segoe UI Light Italic (TrueType)"="seguili.ttf"
"Segoe UI Semibold (TrueType)"="seguisb.ttf"
"Segoe UI Semibold Italic (TrueType)"="seguisbi.ttf"
"Segoe UI Semilight (TrueType)"="segoeuisl.ttf"
"Segoe UI Semilight Italic (TrueType)"="seguisli.ttf"
"Segoe UI Symbol (TrueType)"="seguisym.ttf"
"SimSun & NSimSun (TrueType)"="simsun.ttc"
"SimSun-ExtB (TrueType)"="simsunb.ttf"
"Sitka Small & Sitka Text & Sitka Subheading & Sitka Heading & Sitka Display & Sitka Banner (TrueType)"="Sitka.ttc"
"Sitka Small Bold & Sitka Text Bold & Sitka Subheading Bold & Sitka Heading Bold & Sitka Display Bold & Sitka Banner Bold (TrueType)"="SitkaB.ttc"
"Sitka Small Bold Italic & Sitka Text Bold Italic & Sitka Subheading Bold Italic & Sitka Heading Bold Italic & Sitka Display Bold Italic & Sitka Banner Bold Italic (TrueType)"="SitkaZ.ttc"
"Sitka Small Italic & Sitka Text Italic & Sitka Subheading Italic & Sitka Heading Italic & Sitka Display Italic & Sitka Banner Italic (TrueType)"="SitkaI.ttc"
"Sylfaen (TrueType)"="sylfaen.ttf"
"Symbol (TrueType)"="symbol.ttf"
"Tahoma (TrueType)"="tahoma.ttf"
"Tahoma Bold (TrueType)"="tahomabd.ttf"
"Times New Roman (TrueType)"="times.ttf"
"Times New Roman Bold (TrueType)"="timesbd.ttf"
"Times New Roman Bold Italic (TrueType)"="timesbi.ttf"
"Times New Roman Italic (TrueType)"="timesi.ttf"
"Trebuchet MS (TrueType)"="trebuc.ttf"
"Trebuchet MS Bold (TrueType)"="trebucbd.ttf"
"Trebuchet MS Bold Italic (TrueType)"="trebucbi.ttf"
"Trebuchet MS Italic (TrueType)"="trebucit.ttf"
"Verdana (TrueType)"="verdana.ttf"
"Verdana Bold (TrueType)"="verdanab.ttf"
"Verdana Bold Italic (TrueType)"="verdanaz.ttf"
"Verdana Italic (TrueType)"="verdanai.ttf"
"Webdings (TrueType)"="webdings.ttf"
"Wingdings (TrueType)"="wingding.ttf"
"Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold (TrueType)"="YuGothB.ttc"
"Yu Gothic Light & Yu Gothic UI Light (TrueType)"="YuGothL.ttc"
"Yu Gothic Medium & Yu Gothic UI Regular (TrueType)"="YuGothM.ttc"
"Yu Gothic Regular & Yu Gothic UI Semilight (TrueType)"="YuGothR.ttc"
"Courier 10,12,15"="COURE.FON"
"Courier 10,12,15 (120)"="COURF.FON"
"MS Serif 8,10,12,14,18,24"="SERIFE.FON"
"MS Serif 8,10,12,14,18,24 (120)"="SERIFF.FON"
"MS Sans Serif 8,10,12,14,18,24"="SSERIFE.FON"
"MS Sans Serif 8,10,12,14,18,24 (120)"="SSERIFF.FON"
"Small Fonts"="SMALLE.FON"
"Small Fonts (120)"="SMALLF.FON"
"Holo MDL2 Assets (TrueType)"="holomdl2.ttf"
"TeamViewer13 (TrueType)"="teamviewer13.otf"

答案1

事实证明,即使您明确要求,Windows 也不会显示 Explorer 中安装的所有字体。而且注册表也不是唯一的事实来源。我在其他讨论的回复中忽略了不依赖 Explorer 的重要性。

要查看此内容,请打开 Powershell 并ls C:\Windows\Fonts。突然间,Arial 前面列出了数十种字体 - 包括 ALIEN5.ttf。

解决方案很简单cp C:\Windows\Fonts\arial.ttf C:\Windows\Fonts\001-arial.ttf(这需要管理员权限 - 在开始菜单中,右键单击 powershell 并“以管理员身份运行”),然后重新启动。

答案2

更改 Chrome 中的字体,看看它是否会改变 PDF 的外观。然后将其改回原样,看看它是否保持不变。

你看到有什么不同吗?如果没有,请详细说明你的意思:

使用所需的扩展程序检查 Chrome 中的字体设置,没有任何显示 - 无论如何都重置为默认值。

什么扩展?您是否尝试过禁用/删除它?

另外,请查看Google Chrome 错误地渲染 PDF 字体

当您没有注册字体时,请检查字体文件夹中是否存在该字体,并查看按字母顺序列出的字体中 Arial 是否是第一个。

相关内容