linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
446 stars 71 forks source link

在控制中心選擇字體後並沒有作用,調整字體大小也沒作用 #160

Closed JulianLai closed 6 years ago

JulianLai commented 7 years ago

在控制中心不管怎么选,永远都会回到 unsupported font,调整字体大小也失效 OS: antergos (archlinux)

deepinscreenshot20170212221737 deepinscreenshot20170212221746 deepinscreenshot20170212221753

orrorcol commented 7 years ago

我也遇到了这个问题

JulianLai commented 7 years ago

希望有辦法修復,否則字體太小眼睛滿累的

Acris commented 7 years ago

@hualet @sbwtw 一样的问题,无法设置字体和大小,而且默认字体比较难看,请问下这是已知BUG还是我系统的问题?系统是Arch Linux。

Acris commented 7 years ago

@JulianLai 安装dconf-editor 然后使用dconf-editor修改一次字体设置后,deepin control center中的字体设置就变为可用了,你可以尝试一下,不过请谨慎使用dconf-editor。

BobbyBabes commented 7 years ago

@Acris dconf doesn't resolve anything (for me).

It doesn't recognise the existing keywords font-monospace and font-standard when trying to write new values. But it does read and dump these 2 keywords. It does recognise and allow all operations on the keyword font-size. But that doesn't change the font size. In Deepin Terminal I can change font and font size successfully. To any mono spaced or proportional spaced fonts. So the fonts themselves are not damaged. Prior to issueing the commands below, I've also ran mkfontscale followed by mkfontdir in all font directories.

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto"
sudo mkfontdir -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto"
dconf dump /com/deepin/dde/appearance/
[/]
icon-theme='Paper'
font-size=12.0
font-monospace=''
font-standard=''
background-uris=['file:///home/BobbyBabes/Pictures/Wallpapers/halle_berry_catwoman_pose_pants_mask_ears_patience_phillips_17647_1920x1080.jpg', 'file:///home/BobbyBabes/Pictures/Wallpapers/catwoman-anne-hathaway-3.jpg', 'file:///home/BobbyBabes/Pictures/Wallpapers/Summer-Glau-Wallpapers-Shoot-Gun.jpg', 'file:///home/BobbyBabes/Pictures/Wallpapers/barbarella_desktop_1920x1080_hd-wallpaper-1119737.jpg', 'file:///home/BobbyBabes/Pictures/Wallpapers/adhemas.com-front-cropped-to-16-9.jpg']
gtk-theme='Arc-Grey'
dconf read /com/deepin/dde/appearance/font-size
12.0
dconf read /com/deepin/dde/appearance/font-monospace
''
dconf read /com/deepin/dde/appearance/font-standard
''
dconf write /com/deepin/dde/appearance/font-size 16.0
dconf read /com/deepin/dde/appearance/font-size
16.0
dconf write /com/deepin/dde/appearance/font-monospace 'Fira Mono'
error: 0-1:unknown keyword

Usage:
  dconf write KEY VALUE 

Write a new value to a key

Arguments:
  KEY         A key path (starting, but not ending with '/')
  VALUE       The value to write (in GVariant format)
dconf write /com/deepin/dde/appearance/font-standard 'Fira Sans'
error: 0-1:unknown keyword

Usage:
  dconf write KEY VALUE 

Write a new value to a key

Arguments:
  KEY         A key path (starting, but not ending with '/')
  VALUE       The value to write (in GVariant format)
sudo dconf update
[sudo] password for BobbyBabes: 
error: Error opening directory '/etc/dconf/db': No such file or directory

Usage:
  dconf update

Update the system dconf databases

Changing the value of all 3 font keywords directly doesn't change anything either.

sudo nano /usr/share/glib-2.0/schemas/com.deepin.dde.appearance.gschema.xml

So still (Unsupported font) in Deepin Control Center at "Personalization >> Font >> Standard Font and Personalization >> Font >> Monospaced Font".

This was also reported at the Deepin website : https://translate.google.com/translate?hl=en&sl=zh-CN&tl=en&u=https%3A%2F%2Fbbs.deepin.org%2Fforum.php%3Fmod%3Dviewthread%26tid%3D134884

Acris commented 7 years ago

@BobbyBabes Dconf editor worked for me, you can try to use dconf editor GUI to set font Maybe it's a known issue, we should wait a official fix.

hualet commented 7 years ago

@jouyouyun

BobbyBabes commented 7 years ago

@Acris I can't wait any longer. Dual 4K and one 1440p screen connected (web design and dev testlab). Headache and burning watery eyes (from too small font size with fonts I don't want to use) is what will happen while I have to wait. I will be reinstalling Arch (just to be sure) and a different desktop today. I need to use my desktop for work again tomorrow.

timhere commented 7 years ago

I also cannot set the standard font, the monospaced font, nor change the font size on arch deepin DE.

I haven't tried the dconf option - I will explore that.

jouyouyun commented 7 years ago

Please install noto-fonts firstly, then exec gsettings reset com.deepin.dde.appearance font-standard and gsettings reset com.deepin.dde.appearance font-monospace. Then try to change font size again.

BobbyBabes commented 7 years ago

@jouyouyun I don't have Deepin installed anymore. Good luck to the others with resolving this. P.S. I already had Noto fonts installed. (See mkfontscale and mkfontdir commands above.)

BobbyBabes commented 7 years ago

@jouyouyun I restored the last full backup of Arch+Deepin that I had to an old SSD and booted from that. I checked that the issue was present. Then I tried your fix. I'm confirming that it resolved the issue. After the reset, Noto was selected for standard and mono fonts. Font-size needed a reboot. I could select any font from Deepin Control Centre. I'm adding this as a new multi-boot option to Grub.

EDIT: Forgot to say thanks. So : Thanks!

oberon-manjaro commented 7 years ago

Something is strange here and it seems the default gsettings are not respected for some reason. My suspicion is that some gsettings/wrapping/overriding interfere or contradict each other.

I just built a new ISO and when I boot it up for the first time and open dconf editor before doing anything else, font settings are already showing as if the settings would have been changed by the user and they are empty:

font_dconf

When I reset them to the default, they show correctly 'Noto Mono' and 'Noto Sans'. And, yes noto-fonts are installed here aswell. When I now open the control-center, Noto fonts are correctly specified and I can change the settings, too. But when I open control-center before resetting gsettings to the default it just says "Standard Font" and "Monospaced Font" and the checkmark sits at the bottom of the list on "(Unsupported Font)" and I cannot change it.

jouyouyun commented 7 years ago

@oberon2007 Oh, this is a bug when font name empty, I will fix it in the near future.

timhere commented 7 years ago

@jouyouyun Happy to confirm executing gsettings reset com.deepin.dde.appearance font-standard and gsettings reset com.deepin.dde.appearance font-monospace resolved this issue for me.

jouyouyun commented 7 years ago

@oberon2007 I check the font settings codes, it should reset font when name is empty. Can you paste the log for dde-session-daemon when problem occurred? Try to exec killall dde-session-daemon;/usr/lib/deepin-daemon/dde-session-daemon -v, thanks!

oberon-manjaro commented 7 years ago
$ grep "font" log
<warning> manager.go:142: load default font config failed: open /usr/share/deepin-default-settings/fontconfig.json: no such file or directory
<debug> manager.go:203: resetFonts fonts.SetFamily failed Invalid standard id ''
<warning> handle_gsetting.go:61: Set font-standard failed: Invalid font family ''
<warning> handle_gsetting.go:61: Set font-size failed: Invalid standard id ''
<warning> handle_gsetting.go:61: Set font-monospace failed: Invalid font family ''
oberon-manjaro commented 7 years ago

What should have provided /usr/share/deepin-default-settings/fontconfig.json file?

oberon-manjaro commented 7 years ago

The missing fontconfig however doesn't seem to be the real problem here...

jouyouyun commented 7 years ago

@oberon2007 download the file: dde-session-daemon, then exec chmod +x dde-session-daemon and killall dde-session-daemon;./dde-session-daemon, then check dde-control-center whether normally, thanks!

oberon-manjaro commented 7 years ago

Thanks @jouyouyun . It works as a workaround :stuck_out_tongue_winking_eye:

As you can see dconf-editor still highlights the entries, indicating that they have been modified, not really set to the default. So something is still just not right with the default gsettings...

jouyouyun commented 7 years ago

GSettings default value is not very good deal with the language under the multi-language, so add a file to handle, it is recommended to install this file by default. The file(/usr/share/deepin-default-settings/fontconfig.json) in deepin-default-settings

oberon-manjaro commented 7 years ago

Ok good to know. I'll install the fontconfig then 👍 Thanks!

BobbyBabes commented 7 years ago

@jouyouyun

GSettings default value is not very good deal with the language under the multi-language

This means application settings on Gnome desktop, and on all Gnome/GTK based desktops ? (Just for my understanding. )

jouyouyun commented 7 years ago

@BobbyBabes Just need for DDE, which is what the product manager requires, and need to use different fonts for different languages.

BobbyBabes commented 7 years ago

@jouyouyun OK that's reassuring. I thought that this could also happen with the other Gnome and GTK based installations I have. Thanks.

funilrys commented 7 years ago

Just a question what should I do when it's happended in fresh install ? :smile_cat:

funilrys commented 7 years ago

Finally found it :+1:

Please install noto-fonts firstly, then exec gsettings reset com.deepin.dde.appearance font-standard and gsettings reset com.deepin.dde.appearance font-monospace. Then try to change font size again.

I think we should add it to troubleshooting section of arch wiki or even better add noto-fonts to dependencies somewhere ...

oberon-manjaro commented 7 years ago

I agree. Since noto is specified in gsettings it should be a depends of deepin-desktop-schemas

jouyouyun commented 7 years ago

This bug has been fixed in dde-daemon, please be patient waiting for updates.

Acris commented 7 years ago

@jouyouyun Hello, I have a question, I set the font size to 12 in control center, but in dconf editor the font size is 9. When I change it to 16 in control center, the dconf editor shown is 12 , is this a bug ?

funilrys commented 7 years ago

Same here @Acris didn't notice it :+1:

jouyouyun commented 7 years ago

@sbwtw

Acris commented 7 years ago

The deepin file manager's font size don't changed when I change font size in control center...

BobbyBabes commented 7 years ago

@Acris Yes you're correct. That's why I installed Nautilus. For the rest, it's a bit of a mixed bag. For instance, I have Nautilus installed and the fonts in that are changed instantly when clicking or dragging the font size slider in CC. While Google Chrome requires a restart to pickup the new font size from CC, in its tabs, its menu and its right-click menu,. And so on.

jouyouyun commented 7 years ago

@Acris The font size in dde-control-center is PX, in dconf-editor is PT, so not equal!

Acris commented 7 years ago

@jouyouyun Thank you, it's my mistake, haha

BobbyBabes commented 7 years ago

@jouyouyun @Acris

The deepin file manager's font size don't changed when I change font size in control center...

Where was dconf-editor mentioned ?

Also, Deepin File Manager is oblivious of all styling attempts.

jouyouyun commented 7 years ago

@BobbyBabes dde-file-manager's font size will work after re-open.

Acris commented 7 years ago

@jouyouyun I even tried to reboot my laptop after chang font size, but the file manager's font size still not changed :(

BobbyBabes commented 7 years ago

@jouyouyun Not here. Just tried it again. The font size in CC is set to 16 px. Opened Deepin File Manager. The font size in Deepin File Manager looks too small for 16 px already. Changed the font size in CC from 16 px to 11 px. Closed then opened Deepin File Manager. No change in font size. Changed the font size in CC back to 16 px. Closed and opened Deepin File Manager. No change. The same small font size. The Settings in Deepin File Manager do not offer a font size setting. EDIT: I also had Nemo installed. And if I remember correctly, it also picked up font size changes in CC immediately without closing+opening necessary. Just like Nautilus.

jouyouyun commented 7 years ago

@dragondjf

JulianLai commented 7 years ago

@jouyouyun The font size doesn't affect every QT app.

236

jouyouyun commented 7 years ago

QT apps need to restart

JulianLai commented 7 years ago

@jouyouyun It doesn't work, I even reboot my computer.

jouyouyun commented 7 years ago

@sbwtw

jouyouyun commented 6 years ago

Fixed!