Blazor Web Assembly:可下载字体:glyf:字形 1258 中的复合点数超过 maxp maxCompositePoints
Blazor Web Assembly: downloadable font: glyf: Number of composite points in glyph 1258 exceeds maxp maxCompositePoints
在 Blazor Web Assembly 项目中,我引用 Ubuntu 字体作为项目的默认字体,当我加载任何页面时,我在控制台中收到以下警告:
downloadable font: glyf: Number of composite points in glyph 1258
exceeds maxp maxCompositePoints: 165 vs 150, adjusting limit.
(font-family: "MyFont" style:normal weight:400 stretch:100 src
index:0) source: https://localhost:1111/fonts/Ubuntu-Medium.ttf
这个问题只存在于 Firefox 浏览器中。
环境:windows10
很遗憾,我没有找到解决办法,有什么办法可以解决这个问题吗?
我不是 100% 确定我是否正确解释了警告。
您使用的字体似乎违反了 TrueTypeFont 标准。
也许考虑使用其他版本的字体。或者干脆忽略警告,如果此字体没有其他问题。
以下是有关 TTF 的更多资源:
- https://docs.microsoft.com/en-us/typography/opentype/spec/ttch01
- https://docs.microsoft.com/en-us/typography/opentype/otspec180/maxp
建议
很明显,您使用的字体可以通过 google 字体获得 API。
开始方法如下:link
请注意,使用这种方法,您的浏览器将直接从 google 获取字体。此外,字体将采用 woff2 格式。
在 Blazor Web Assembly 项目中,我引用 Ubuntu 字体作为项目的默认字体,当我加载任何页面时,我在控制台中收到以下警告:
downloadable font: glyf: Number of composite points in glyph 1258 exceeds maxp maxCompositePoints: 165 vs 150, adjusting limit. (font-family: "MyFont" style:normal weight:400 stretch:100 src index:0) source: https://localhost:1111/fonts/Ubuntu-Medium.ttf
这个问题只存在于 Firefox 浏览器中。
环境:windows10
很遗憾,我没有找到解决办法,有什么办法可以解决这个问题吗?
我不是 100% 确定我是否正确解释了警告。
您使用的字体似乎违反了 TrueTypeFont 标准。
也许考虑使用其他版本的字体。或者干脆忽略警告,如果此字体没有其他问题。
以下是有关 TTF 的更多资源:
- https://docs.microsoft.com/en-us/typography/opentype/spec/ttch01
- https://docs.microsoft.com/en-us/typography/opentype/otspec180/maxp
建议
很明显,您使用的字体可以通过 google 字体获得 API。
开始方法如下:link
请注意,使用这种方法,您的浏览器将直接从 google 获取字体。此外,字体将采用 woff2 格式。