Open chenjing0823 opened 4 months ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Origin Title: [Bug] 字体选择后,页面上的字体没有一点变化,有时候有几个字体又有变化的
Title: [Bug] After font selection, the fonts on the page do not change at all, and sometimes several fonts change.
0.1.9
https://univer.work/playground/?title=Vue%203
Switch fonts normally
Changing fonts for cells often fails to take effect. Occasionally, a few fonts can be switched successfully. In most cases, the fonts here are switched without any changes in the cells.
No response
No response
英文和数字,可以设置这四个字体
中文无法设置字体。数据的样式里是有对应的字体的,应该是显示的问题。
如果单元格同时输入中文和字母,设置字体就可以发现显示的时候英文生效了,中文不生效
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For English and numbers, you can set these four fonts
Font cannot be set for Chinese. There is a corresponding font in the data style, so it should be a display problem.
If you input Chinese characters and letters into a cell at the same time, you can set the font and you will find that English takes effect when displayed, but Chinese does not take effect.
英文和数字,可以设置这四个字体
中文无法设置字体。数据的样式里是有对应的字体的,应该是显示的问题。
如果单元格同时输入中文和字母,设置字体就可以发现显示的时候英文生效了,中文不生效
由于 Mac 系统中未预装某些中文字体,导致无法显示不同的字体。未来我们会讨论一个兼容方案。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For English and numbers, you can set these four fonts![image](https://private-user-images.githubusercontent.com/34295555/328769112-46b18007-e491-4265-9947-fb978644e5cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp XVCJ9. .XVExl8kIFci-Js9jlJnkrEjy8prZOwyHLv4-tz2Poes)
Chinese font cannot be set. There is a corresponding font in the data style, so it should be a display problem.
If Chinese characters and letters are input into the cell at the same time, you can set the font and you will find that the English language takes effect when displayed, but the Chinese character does not take effect.
Because some Chinese fonts are not preinstalled on the Mac system, different fonts cannot be displayed. We will discuss a compatibility solution in the future.
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For English and numbers, you can set these four fonts![image](https://private-user-images.githubusercontent.com/34295555/328769112-46b18007-e491-4265-9947-fb978644e5cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6Ik pXVCJ9 ..XVExl8kIFci-Js9jlJnkrEjy8prZOwyHLv4-tz2Poes) Chinese font cannot be set. There is a corresponding font in the data style, so it should be a display problem. If Chinese characters and letters are input into the cell at the same time, you can set the font and you will find that the English language takes effect when displayed, but the Chinese character does not take effect.
Because some Chinese fonts are not pre-installed in the Mac system, different fonts cannot be displayed. We will discuss a compatibility solution in the future.
But I can use these fonts normally in DingTalk online documents. There should be these Chinese fonts, right?
英文和数字,可以设置这四个字体
中文无法设置字体。数据的样式里是有对应的字体的,应该是显示的问题。 如果单元格同时输入中文和字母,设置字体就可以发现显示的时候英文生效了,中文不生效
由于 Mac 系统中未预装某些中文字体,导致无法显示不同的字体。未来我们会讨论一个兼容方案。
似乎是这个原因。我用同事的windows电脑,可以正确预览部分字体。目前我看到钉钉在线文档,是可以预览这些中文字体的,那应该是钉钉在线文档那边做了一些处理方案是吧?我还以为钉钉在线文档能正常预览,就代表我已经正常安装了这些字体呢
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For English and numbers, you can set these four fonts![image](https://private-user-images.githubusercontent.com/34295555/328769112-46b18007-e491-4265-9947-fb978644e5cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6Ik pXVCJ9 ..XVExl8kIFci-Js9jlJnkrEjy8prZOwyHLv4-tz2Poes) Chinese font cannot be set. There is a corresponding font in the data style, so it should be a display problem. If Chinese characters and letters are input into the cell at the same time, you can set the font and you will find that the English language takes effect when displayed, but the Chinese character does not take effect.
Because some Chinese fonts are not pre-installed in the Mac system, different fonts cannot be displayed. We will discuss a compatibility solution in the future.
This seems to be the reason. I use a colleague's Windows computer and can preview some fonts correctly. At present, I see that DingTalk online documents can preview these Chinese fonts. It should be that DingTalk online documents have made some solutions, right? I thought that being able to preview DingTalk online documents normally meant that I had installed these fonts normally.
我觉得可以先参考这个方法来过滤出用户系统已经有的字体 https://www.zhangxinxu.com/wordpress/2018/02/js-detect-suppot-font-family/comment-page-1/。
进阶一点的话就是类似钉钉文档可以提供一个下载按钮来加载部分可商用字体。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I think you can refer to this method first to filter out the fonts that the user system already has [https://www.zhangxinxu.com/wordpress/2018/02/js-detect-suppot-font-family/comment-page-1/] (https://www.zhangxinxu.com/wordpress/2018/02/js-detect-suppot-font-family/comment-page-1/).
To be more advanced, something like DingTalk documents can provide a download button to load some commercially available fonts.
The refactoring of IConfigService
is complete. We are currently exploring the best approach to allow developers to add custom fonts or modify the built-in font list through configuration settings.
在您提交此问题之前,您是否检查了以下内容?
受影响的包和版本
0.1.9
复现链接
https://univer.work/playground/?title=Vue%203
预期行为
正常切换字体
实际行为
给单元格切换字体,经常无法生效。偶尔有几个字体可以切换成功,大部分情况这边字体切换了,单元格内没有任何变化![image](https://github.com/dream-num/univer/assets/34295555/1f2287dc-8af6-441a-9c90-380be15a4a4b)
运行环境
No response
系统信息
No response