View previous topic :: View next topic |
Author |
Message |
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Mon Nov 07, 2016 7:07 am Post subject: Fixing font rendering issues [Solved] |
|
|
Okay, so I do not have much idea regarding font rendering so I decided to stick with infinality to make things easier for me to figure out.
First let's see if I did things right, these are the output of 'eselect lcdfilter list', 'eselect infinality list' and last one is fontconfig settings.
Code: |
Available styles:
[1] custom
[2] default
[3] infinality
[4] infinality-classic
[5] infinality-nudge
[6] infinality-push
[7] infinality-sharpened
[8] infinality-shove *
[9] linux
[10] nyx
[11] osx
[12] ubuntu
[13] ultimate
[14] vanilla
[15] windows-7
[16] windows-7-light
[17] windows-xp
[18] windows-xp-light
|
Code: |
Available styles:
[1] debug
[2] infinality *
[3] linux
[4] nyx
[5] osx
[6] osx2
[7] ultimate-combi
[8] ultimate-free
[9] ultimate-ms
[10] win7
[11] win98
[12] winxp
|
Code: |
eselect fontconfig list
Available fontconfig .conf files (* is enabled):
[1] 10-autohint.conf
[2] 10-no-sub-pixel.conf
[3] 10-powerline-symbols.conf
[4] 10-scale-bitmap-fonts.conf
[5] 10-sub-pixel-bgr.conf
[6] 10-sub-pixel-rgb.conf
[7] 10-sub-pixel-vbgr.conf
[8] 10-sub-pixel-vrgb.conf
[9] 10-unhinted.conf
[10] 11-lcdfilter-default.conf
[11] 11-lcdfilter-legacy.conf
[12] 11-lcdfilter-light.conf
[13] 20-unhint-small-dejavu-sans.conf
[14] 20-unhint-small-dejavu-sans-mono.conf
[15] 20-unhint-small-dejavu-serif.conf
[16] 20-unhint-small-vera.conf
[17] 25-unhint-nonlatin.conf
[18] 30-metric-aliases.conf
[19] 30-urw-aliases.conf
[20] 31-cantarell.conf
[21] 40-nonlatin.conf
[22] 42-luxi-mono.conf
[23] 45-latin.conf
[24] 49-sansserif.conf
[25] 50-user.conf
[26] 51-local.conf
[27] 52-infinality.conf *
[28] 57-dejavu-sans.conf
[29] 57-dejavu-sans-mono.conf
[30] 57-dejavu-serif.conf
[31] 59-google-droid-sans.conf
[32] 59-google-droid-sans-mono.conf
[33] 59-google-droid-serif.conf
[34] 60-latin.conf
[35] 60-liberation.conf
[36] 62-croscore-arimo.conf
[37] 62-croscore-cousine.conf
[38] 62-croscore-symbolneu.conf
[39] 62-croscore-tinos.conf
[40] 63-source-pro.conf
[41] 65-fonts-persian.conf
[42] 65-khmer.conf
[43] 65-nonlatin.conf
[44] 66-lohit-bengali.conf
[45] 69-unifont.conf
[46] 70-no-bitmaps.conf
[47] 70-yes-bitmaps.conf
[48] 80-delicious.conf
[49] 90-synthetic.conf
[50] 99pdftoopvp.conf
|
For fontconfig, I manually disabled everything other than 52-infinality.conf according to Gentoo wiki.
My first issue is that the fonts in Firefox look okay but they are too small and I have to resort to manually adjust zoom level. I'm using firefox-bin, I've read a thread somewhere that manually compiling firefox package with 'system-cairo' use flag would improve font rendering. Is that true or applicable in my case?
My screen is small to start with as my netbook has 11 inch screen, for terminals and stuff in general it is not an issue as I've configued it to have bigger fonts.
Mainly for firefox, I have eye strains because of small fonts. I would appreciate any advice regarding my issues.
Thanks for your time.
Last edited by irenicus09 on Fri Apr 07, 2017 4:57 pm; edited 1 time in total |
|
Back to top |
|
|
EmaRsk Apprentice
Joined: 07 Sep 2004 Posts: 158 Location: Italy
|
Posted: Mon Nov 07, 2016 10:15 am Post subject: |
|
|
I solved the same issue with this /etc/X11/xorg.conf.d/90-monitor.conf :
Code: | Section "Monitor"
Identifier "<default monitor>"
# 1920 x 1080
# DisplaySize in mm
# default = 96 dpi
#DisplaySize 508 285
# actually 508 285.75
# real = 158 dpi
# as given by xrandr:
#DisplaySize 309 173
# should be ?
#DisplaySize 308 173
# or ?
#DisplaySize 309 174
# 120 dpi = 406.4 228.6
DisplaySize 407 229
EndSection
|
As you see, there are a bunch of comments to remember me how I got to those numbers.
If I remember correctly, I tried to set the dpi parameter directly, but couldn't get it to work.
As I side note, I tried Infinality, but it did worse rendering for me, or maybe I just misconfigured it, anyway I got rid of it and now it's alright. _________________ Please, avoid some common spelling errors:
http://theoatmeal.com/comics/misspelling |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Mon Nov 07, 2016 1:31 pm Post subject: |
|
|
Okay so according to xrandr this is what I have
Code: |
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
eDP1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 260mm x 150mm
1366x768 59.97*+
1280x720 60.00
1024x768 60.00
1024x576 60.00
960x540 60.00
800x600 60.32 56.25
864x486 60.00
640x480 59.94
720x405 60.00
680x384 60.00
640x360 60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
|
How do I figure out what the correct display size for me is? |
|
Back to top |
|
|
EmaRsk Apprentice
Joined: 07 Sep 2004 Posts: 158 Location: Italy
|
Posted: Mon Nov 07, 2016 3:50 pm Post subject: |
|
|
You need to try
An inch is 25.4 mm, so the formula is Code: | resolution * 25.4 / dpi = size [in mm] |
The Xorg default is 96 dpi (which corresponds to a 0.266mm pixel, pretty big for current standards). At 1366x768 this would mean a 361x203 mm monitor.
According to xrandr your monitor is 260x150 mm and 1366x768 pixels (which would mean that one pixel is 0.190x0.195 mm, so slightly taller than wider).
This means 1366*25.4/260 ~= 133 dpi horizontally and 768*25.4/150 ~= 130 dpi vertically. If xrandr is right, these are - give or take - your real dpi values.
I found that for me a 120 dpi setting is about right (at 96 dpi the fonts are too small and at my real 158 dpi they are way too big).
For you this would mean 1366*25.4/120 ~= 289 mm and 768*25.4/120 ~= 163 mm.
So, you could try to put the real values DisplaySize = 260 150, and if the fonts are too big you can then try with DisplaySize = 289 163 (that is, 120 dpi) and see whether it works better. If not, substitute the 120 dpi with something to your taste and redo the calculations. _________________ Please, avoid some common spelling errors:
http://theoatmeal.com/comics/misspelling |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Mon Nov 07, 2016 6:20 pm Post subject: |
|
|
@EmaRsk: Thanks a lot for your explanation. I tried both but for some reason fonts rendered in firefox stayed pretty much the same size but I did notice everything else getting blown out of proportions lol.
I then decided to remove the config, and messed around with infinality lcdfilter settings for a bit.
What was interesting to see is that I didn't realize it before that you need to restart X-server to see the desired effect.
The effects are so nice, currently I'm using lcdfilter shove although firefox fonts size didn't change much but overall the font rendering is really nice and good to look at.
I'm planning to give system-cairo useflag a try and build firefox from source to see if it makes any difference.
Thanks for your help once again |
|
Back to top |
|
|
EmaRsk Apprentice
Joined: 07 Sep 2004 Posts: 158 Location: Italy
|
Posted: Mon Nov 07, 2016 6:40 pm Post subject: |
|
|
Well, to each his own…
For Firefox rendering you can of course use its preference page: you can set the default font size AND the minimum font size. Also, I think it remembers the zoom setting per site. _________________ Please, avoid some common spelling errors:
http://theoatmeal.com/comics/misspelling |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Fri Apr 07, 2017 4:57 pm Post subject: |
|
|
Sorry for grave digging an old post, but I need to give credit where it is due.
@EmaRsk: You were right all along, thanks for showing me the way to calculate DPI that is suitable for me.
I have figured out most of the infinality font rendering stuff later on, and setting the correct dpi for my screen makes it look even better.
Thanks a lot for your time. |
|
Back to top |
|
|
|