You are not logged in.

#1 2015-07-02 09:31:49

Hacksign
Member
Registered: 2012-07-30
Posts: 137

[SOLVED]High resolution & small font problem

I recently bought a new computer.
The resolution of new computer is 2560x1440.
I installed Archlinux with awesome WM.
The problem is font too small, I tried to modify the dpi setting with xrandr --dpi 110,but nothing changed.

Can I get larger font with one global configuration with under high resolution ?

How to solve:
use DisplaySize property in  /etc/X11/xorg.conf.d/10-monitor.conf
how to caculate DisplaySize
size = <resolution_width/height>/<wanted_dpi> * 25.4

for example:
my resolution is 2560x1440 and want a 120 DPI:
541 = 2560/120 * 25.4
304 = 1440/120 * 25.4

so:
DisplaySize 541 304

Last edited by Hacksign (2015-07-04 09:00:14)

Offline

#2 2015-07-02 10:14:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]High resolution & small font problem

Offline

#3 2015-07-02 14:09:44

Hacksign
Member
Registered: 2012-07-30
Posts: 137

Re: [SOLVED]High resolution & small font problem

Below methods do not have any effects:

hacksign@localhost [21:57:25] : ~                                                                                                                                                                                                                                                                                      
>> cat /etc/X11/xorg.conf.d/10-monitor.conf 
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Monitor"
	Identifier   "Monitor0"hacksign@localhost [22:02:36] : ~                                                                                                                                                                                                                                                                                      
>> xrandr --dpi 145
hacksign@localhost [22:04:12] : ~                                                                                                                                                                                                                                                                                      
>> xdpyinfo | grep resoluti
  resolution:    145x145 dots per inch

	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	Option "DPI" "145 x 145"
EndSection
Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
                Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

hacksign@localhost [21:57:37] : ~                                                                                                                                                                                                                                                                                      
>> cat ~/.config/fontconfig/fonts.conf 
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
	<match target="pattern">
		<edit name="dpi" mode="assign"><double>145</double></edit>
	</match>
</fontconfig>

DPI remains the same:

hacksign@localhost [22:02:27] : ~                                                                                                                                                                                                                                                                                      
>> xdpyinfo | grep resoluti
  resolution:    96x96 dots per inch

following command takes effect,but not persistent :

hacksign@localhost [22:02:36] : ~                                                                                                                                                                                                                                                                                      
>> xrandr --dpi 145
hacksign@localhost [22:04:12] : ~                                                                                                                                                                                                                                                                                      
>> xdpyinfo | grep resoluti
  resolution:    145x145 dots per inch

Offline

#4 2015-07-02 14:25:43

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED]High resolution & small font problem

Hacksign wrote:

following command takes effect,but not persistent

So to make it persistent, pop it in your ~/.xinitrc (or ~/.xprofile if you're using a display manager). That way, it will get executed on each login.

Offline

#5 2015-07-03 03:43:16

Hacksign
Member
Registered: 2012-07-30
Posts: 137

Re: [SOLVED]High resolution & small font problem

I have tried many configuration of Xorg.conf,below is my current configure:

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
	Load  "glx"
	Load  "freetype"
	Load  "type1"
	Load  "dri"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "Device" 
	Identifier 	"Card0" 
	Driver  	"intel"
	BusID 		"PCI:0:2:0" 
	Option 		"ZaphodHeads" "eDP1" 
	Option 		"AccelMethod" "sna" 
	Screen 0
EndSection 

Section "Device" 
	Identifier "Card1" 
	Driver  "intel"
	BusID "PCI:0:2:0" 
	Option "ZaphodHeads" "HDMI2" 
	Option 	"AccelMethod" "sna" 
	Screen 1
EndSection 

Section "Monitor"
	Identifier "Monitor0"
	DisplaySize 310 174
	Option		 "Primary" "true"
EndSection
Section "Monitor"
	Identifier "Monitor1"
	DisplaySize 531 299
	Option		 "RightOf" "Monitor0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor		 "Monitor0"
	SubSection "Display"
		Depth 24
		Modes "2560x1440"
	EndSubsection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor		 "Monitor1"
	SubSection "Display"
		Depth 24
		Modes "1920x1080"
	EndSubsection
EndSection


Section "ServerLayout"
	Identifier 		"default"
	Screen 			0 "Screen0" 0 0  
	Screen 			1 "Screen1" RightOf "Screen0"  
	InputDevice    	"Keyboard0" "CoreKeyboard"
EndSection

the promblem is
If I add 'Screen "Screen1" RightOf "Screen0" ' in ServerLayout section,my second monitor can be activited, but only a cross mouse cursor appears when I moved mouse to second screen.
If I remove 'Screen "Screen1" RightOf "Screen0" ' in ServerLayout section, second monitor just copied display of monitor one.I have to adjust it as extend screen ervertime sad

anoter problem is :
mouse cursor too small in high resolution, how can I make it bigger ?

Offline

Board footer

Powered by FluxBB