-
Notifications
You must be signed in to change notification settings - Fork 79
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
Font size in GUI #292
Comments
Quoting whiffee (2022-06-03 19:23:27)
Have working build on Xubuntu 21.10 but GUI is unusable on
4K monitor because of tiny fontsize.
Are you really using the 'gl' backed? This is rather limited font-wise,
as it only comes with one prefab fixed size font. The cairo backend is
much more flexible and should also properly correct font size for
display dpi, so if you are not using that, I suggest switching backends.
|
Thanks zevv for response. Here is the configure. What do I need to reconfigure gary@xubu2110:~/Downloads/duc-master$ ./configure configuration summary:
gary@xubu2110:~/Downloads/duc-master$ |
Quoting whiffee (2022-06-03 19:46:20)
Thanks zevv for response. Here is the configure. What do I need to reconfigure
to get cairo in harness?
- Package version: duc 1.4.5-rc1
- Prefix: /usr/local
- Database backend: tokyocabinet
- X11 support: yes
- OpenGL support: no
- UI (ncurses) support: yes
- Graph cairo support: yes
There it is: you are using cairo indeed. So we might have a problem
with the dpi calculation.
If you feel up to it, could you add a debug print in cmd-gui.c as below
and report the result?
int w_px = DisplayWidth(dpy, 0);
int w_mm = DisplayWidthMM(dpy, 0);
printf("px=%d mm=%d\n", w_px,w_mm); // add this
if(w_px && w_mm) {
double dpi = 25.4 * w_px / w_mm;
duc_graph_set_dpi(graph, dpi);
}
|
I tried sticking it right at the end of cmd-gui.c like so:
" g toggle graph gradient\n" }; int w_px = DisplayWidth(dpy, 0); #endif /*
make all-am
|
Quoting whiffee (2022-06-03 20:07:17)
I tried sticking it right at the end of cmd-gui.c like so:
Ah, no, sorry: I ment only insert the printf() line in that file
around these lines as shown in the snippet, that fragment is at line 286
…--
:wq
^X^Cy^K^X^C^C^C^C
|
Okay, I got it. I have things cleaned up now and can 'make' the source with and without the extra line in cmd-gui.c. However, I don't know where to look for the printed output. The terminal 'make' output with the added line looks like this: make[1]: Entering directory '/home/gary/Downloads/duc-master' The keywords are not in there anywhere. Is there a way to make the running app show the desired info? Is there a log file somewhere? (Sorry for being so dense.) |
The keywords are not in there anywhere. Is there a way to make the running app show the desired info? Is there a log file somewhere? (Sorry for being so dense.)
Yes, if you now run 'duc gui' it should print this particular
line on the standard output.
|
Ah, slick. Okay, here it is: |
I just thought of something. The pixel count is correct, but the mm length quoted is 40 inches. However, my monitor is only 15.6 inches. Is there a standard sized pixel factored in somewhere? If so, could that be the explanation? |
Quoting whiffee (2022-06-03 22:42:18)
Ah, slick. Okay, here it is:
px=3840 mm=1016
Right, that will make your dpi 25.4*3840/1016 = 96 dpi
Is your screen really 1 meter wide? Can you check the output of
the following command?
xdpyinfo |grep -B2 resolution
Assuming your screen is not 1 meter wide, there is a problem with your
desktop environment or X11 resulting in a wrong DPI setting. Duc picks
this wrong value up and scales the font accordinly.
|
Quoting whiffee (2022-06-03 22:52:54)
I just thought of something. The pixel count is correct, but the mm
length quoted is 40 inches. However, my monitor is only 15.6 inches.
Is there a standard sized pixel factored in somewhere?
Right, there is your problem! DPI configuration is a bit of a PITA,
since there are a lot of components involved in both hardware and
software. I recommend googling your way around a bit to see how you can
properly configure your setup to report the right display size and DPI.
If you can't make this work, we might be able to add an option to duc to
override the detected DPI, but I'm pretty sure this is not the right
solution to your problem.
Here's something to get you started, as you can see it's a mine field:
https://wiki.archlinux.org/title/HiDPI
…--
:wq
^X^Cy^K^X^C^C^C^C
|
Related: Is there a simple edit to the source to double - or even triple - the size of the font in macOS ? |
>>>> "F" == F Baube ***@***.***> writes:
Related: Is there a simple edit to the source to double - or even
triple - the size of the font in macOS ?
If you look in the duc.1 man page, you will see the option --css-url
which you can use to the CGI script to append your own CSS options to
the CGI script. You can find an example CSS file in examples/css in
the source tar ball.
For the graph generation tools, you can try the --dpi switch to change
some defaults when using a higher resolution display.
If you have any suggestions, or even better patches, we'd be happy to
look them over and possibly include them in the next release.
John
|
Hi All,
Have working build on Xubuntu 21.10 but GUI is unusable on
4K monitor because of tiny fontsize.
A response to issue #201 focused on the lines in guigl.c:
I have tried 0.5, 2.0, 4.0, 8.0 and 16.0 as trial values for font_scale
but it has made no difference. What else could I try?
thanks,
GB
The text was updated successfully, but these errors were encountered: