New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set default font family for fonts not found in document server #37

Closed
renothing opened this Issue Jul 25, 2016 · 24 comments

Comments

Projects
None yet
@renothing

renothing commented Jul 25, 2016

I installed document server 4.0.0 and I added many chinese fonts, it works well. but there is few docs used uncommon fonts which is not available in document server. how ever when I selected them and set font by manually. it will display correctly. look at the following pics:

before I select and set font
20160725112632

after set font manually
20160725112657
20160725112708

so, my question is, is there a way to set default font family for unknown characters ?

@K0R0L

This comment has been minimized.

K0R0L commented Jul 25, 2016

No, we do not select the font for symbols. Recruitment is solely on the exposed font. Those. for example if a font was specified with the support of Chinese characters - to pick up the same. We will think about how to solve this problem. The whole point in time text jumps. If you do the selection by symbols - the input may become unresponsive.

@renothing

This comment has been minimized.

renothing commented Jul 26, 2016

yes, it's a problems. so the really problem is how to detect the language which symbols used.
you can have a try
make a new doc by openoffice with a linux only font(which is unavailable in windows), and then open it by office on windows. you will found it works fine still. because ms office choosed similar replace font for it.

@lonstanley

This comment has been minimized.

lonstanley commented Aug 14, 2016

How to install chinese fonts in DocumentServer 4.0 ??
@renothing

@trofim24

This comment has been minimized.

Contributor

trofim24 commented Aug 14, 2016

solution in #7 ?

@lonstanley

This comment has been minimized.

lonstanley commented Aug 16, 2016

can not find the file: /var/www/onlyoffice/documentserver/Tools/GenerateAllFonts.sh in DocumentServer, but /var/www/onlyoffice/documentserver/server/tools/AllFontsGen

i put tff font to /usr/share/fonts/directory and run AllFontsGen, but it doesn`t work

@ShockwaveNN

This comment has been minimized.

Member

ShockwaveNN commented Aug 16, 2016

@lonstanley you should run not AllFontsGen directly, but by sh file
bash /usr/bin/documentserver-generate-allfonts.sh

@goodwinfame

This comment has been minimized.

goodwinfame commented Oct 10, 2016

I added fonts in /usr/share/fonts/, then run documentserver-generate-allfonts.sh, the docs displayed correct, but I can't change the font to which I added, the added fonts are not in the font list.

@ibnpetr

This comment has been minimized.

Member

ibnpetr commented Oct 10, 2016

@swim1986 Please clear the browser's cache.
Inform about the results.

@goodwinfame

This comment has been minimized.

goodwinfame commented Oct 11, 2016

@ibnpetr It is in the font list, my reckless, I didn't seen them at a glance.

@bdxing

This comment has been minimized.

bdxing commented Oct 11, 2016

@renothing 问一下,你的中文乱码解决了么?

@renothing

This comment has been minimized.

renothing commented Oct 11, 2016

@bdxing 默认乱码没办法。其他ok。参考上面说的办法。

@bdxing

This comment has been minimized.

bdxing commented Oct 13, 2016

@renothing 我按照上面方法把字体库放到系统里后,运行shell文件后,我再做成镜像后,运行这个镜像,浏览器里,打开文档的时候,页面上提示无法转换,你有没有遇到呢

@goodwinfame

This comment has been minimized.

goodwinfame commented Oct 13, 2016

@bdxing 贴一个解决办法@eqmo的解决办法
首先将.ttf字体放入fonts文件夹
然后:
cd /usr/share/fonts/
tar cv * | docker exec -i XXX tar x -C /usr/share/fonts/
docker exec XXX /var/www/onlyoffice/documentserver/Tools/GenerateAllFonts.sh
XXX是容器id

然后重启容器,清理浏览器缓存就好了,另外服务完全重启需要几分钟时间,如果重启不成功会出现打开文档报错,或者无法打开等问题。可以重新重启容器。

@bdxing

This comment has been minimized.

bdxing commented Oct 13, 2016

@swim1986 我这边的问题是:当前我在容器里都以经把字体都调好了,但我把这个容器再保存成镜像后,启动这个镜像后,刷新浏览器后,上面就提示无法转换,不知道为什么。

@eqmo

This comment has been minimized.

eqmo commented Oct 13, 2016

The new version the command after copy the fonts is different:
Run this command against the document server container ID XXXX

docker exec XXXXXX /usr/bin/documentserver-generate-allfonts.sh

@renothing

This comment has been minimized.

renothing commented Oct 13, 2016

@bdxing the conversion working as sign thread, so there is some docs conversion faild always. you just need try again

@wxf26054

This comment has been minimized.

wxf26054 commented Jan 20, 2017

How can I intergrate the Chinese Fonts to OnlyOffice on Windows Server?

@JohnPerkin

This comment has been minimized.

JohnPerkin commented Jan 20, 2017

Please follow this instruction.

  1. Copy the font to 'C:\Windows\Font' (to the computer with Document Server installed).
  2. Open the folder 'C:\Program Files\ONLYOFFICE\DocumentServer\bin' and run 'documentserver-generate-allfonts.bat'.
    It will scan the system font folder for the installed font. The font will be used by the AllFonts.js script to form the font thumbnails in the editors and add the font metrics to the font_selection.bin file for its further usage.
  3. Find in Task Manager 'ONLYOFFICE Converter Service' and restart it.
  4. Clear the browser cache and reopen the page.
@JohnPerkin

This comment has been minimized.

JohnPerkin commented Mar 13, 2017

Dear ONLYOFFICE users!
We are working hard on implementation of asian fonts in Document Server. So we need both standard and non-standard fonts to analyze their behaviour in our product. Please send us fonts via support@onlyoffice.com or attach them to your messages. We will appreciate your assistance.
Best regards
John
ONLYOFFICE support team

@chicol

This comment has been minimized.

chicol commented Apr 27, 2017

@renothing Have this problem solved?

@102010cncger

This comment has been minimized.

102010cncger commented Sep 1, 2017

Have this problem solved?

@dnwk

This comment has been minimized.

dnwk commented Feb 7, 2018

Is it possible to use web-fonts instead of loading fonts from server?

@K0R0L

This comment has been minimized.

K0R0L commented Feb 8, 2018

  1. We are using only server fonts.
  2. Proplem with unvisible/default symbols ("square") - will be fixed in version 5.1. Soon.
@ShockwaveNN

This comment has been minimized.

Member

ShockwaveNN commented Apr 6, 2018

Closing since 5.1.0 released

@ShockwaveNN ShockwaveNN closed this Apr 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment