ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.65k stars 312 forks source link

CJK characters unwanted fallback to Unicode Consortium's Last Resort font #1450

Open jisa0224 opened 6 months ago

jisa0224 commented 6 months ago

This issue is unique.

Operating System

Linux (DEB package)

Version information

7.5.1.23 (deb)

Expected Behavior

Type some CJK character (or any character not supported by "Arial") Select font "Arial" for those characters Those characters should fallback to fonts supporting those characters

Screenshot_20231230_220905

Actual Behavior

Those characters now fallback to font "Last Resort"

Screenshot_20231230_220731

Reproduction Steps

  1. Clean install Arch Linux
  2. Install AUR (en) - onlyoffice-bin, which is a DEB package

The behavior is as expected (those characters will fallback to "Noto Sans CJK TC")

  1. Download unicode-org/last-resort-font: Last Resort Font and put into ~/.local/share/fonts

The behavior is incorrect (those characters now fallback to "Last Resort")

  1. Remove the font file

The behavior is as expected (those characters will fallback to "Noto Sans CJK TC")

Additional information

The OnlyOffice UI has no problem. The editor and the style selection panel have this problem.

It seems that the UI use system Fontconfig, but the editor doesn't use Fontconfig. The editor seems to use OnlyOffice's own Font Engine (becuase I disable Last Resort in Fontconfig doesn't solve the problem. The font selection still shows all fonts I disabled by Fontconfig).

Since "Last Resort" covers fall Unicode range, maybe it has a high priority than "Noto Sans CJK TC" (I didn't find any related code).

Can I force OnlyOffice to not use its own Font Engine but use system's Fontconfig to handle font fallbacking?

Or, if I must use the Font Engine (it seems like this is what OnlyOffice's intention), can I disable a particular font (e.g. "Last Resort") in OnlyOffice without deleteing it in my system?

ElenaMaaya commented 5 months ago

Hello, @jisa0224! Unfortunately, Desktop Editors ONLYOFFICE doesn't yet have that option. I created ticket as issue 66368 in our issues tracker to this proposal. Thank you for contacting us.

jisa0224 commented 5 months ago

Hello, @jisa0224! Unfortunately, Desktop Editors ONLYOFFICE doesn't yet have that option. I created ticket as issue 66368 in our issues tracker to this proposal. Thank you for contacting us.

Thanks! Have a great day!