Open kureta opened 4 years ago
Following uo on this (better late than never!) and this other thread on the Ircam forum:
Please consider the following code snippet. Copy-paste on a Lisp buffer (from the "File" menu, "New... > New Text/Lisp Buffer"), and evaluate it (select the text, then menu "Lisp > Eval Region").
(capi::contain
(make-instance
'capi::title-pane
:text "Test"
:font (gp::make-font-description
:family "Calibri"
:size 9
:slant :roman
:weight :normal
:charset :ansi
)))
This should display a tiny window with just a "Test" text label in it, which corresponds to the display of a basic text label in OM# user interfaces. As a first step, please let me know if this also displays wrong in HiDPi / 4K displays.
On Linux, please replace "Calibri" by "Liberation Sans" to reproduce the current OM# call.
Thanks
For Windows, this is a really easy fix! "Calibri" is kind of faint, "Tahoma" is clear but a little squished, "Arial" works perfectly and is crystal clear. That's all that needs to be done.
I'll look into the Linux issue next week. I'm off for a few days.
Well done!
Ok. I think we'll have to make some choice for the default font faces (also on macOS) so I'll probably request more assistance for testing. Attached is a temporary font definition file: please unzip it and copy font-defs.lisp
it in the folder \om-sharp\init\
and restart OM#.
With this file you will be able to tweak the font settings for easily, by evaluating in the listener:
(setf *def-font* '("Arial" (11 12 14 16 20))
(where the list of numbers are the default sizes used in OM# -- most of the times in the UI, only the first and second sizes are used)
The attached font-defs.lisp file and picture show that this Windows configuration looks great -- it's crystal clear The only font I'm not sure of is monospace font -- how can I test it?
(I'll test the Linux version soon.)
On 4/1/2021 3.40 AM, Jean Bresson wrote:
Ok. I think we'll have to make some choice for the default font faces (also on macOS) so I'll probably request more assistance for testing. Attached is a temporary font definition file: please unzip it and copy |font-defs.lisp| it in the folder |\om-sharp\init| and restart OM#. With this file you will be able to tweak the font settings for easily, by evaluating in the listener:
|(setf def-font '("Arial" (11 12 14 16 20)) |
(where the list of numbers are the default sizes used in OM# -- most of the times in the UI, only the first and second sizes are used)
font-defs.lisp.zip https://github.com/cac-t-u-s/om-sharp-users/files/6241848/font-defs.lisp.zip
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cac-t-u-s/om-sharp-users/issues/3#issuecomment-811714058, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATPOSPRY5SXPZULILHIMBKDTGQPNZANCNFSM4PSUBCAA.
;;; temporary redefinitions for easier experimentation with default fonts in OM#
(in-package :oa)
(defparameter def-font
)
(defparameter mono-font
)
(defparameter gui-font
)
(defparameter score-font '("Tahoma" 10))
(defun om-def-font (font-id &key face size style) (let ((def-face (car def-font)) (sizes (cadr def-font))) (let ((font (case font-id (:font1 (om-make-font def-face (nth 0 sizes))) (:font2 (om-make-font def-face (nth 1 sizes))) (:font3 (om-make-font def-face (nth 2 sizes))) (:font4 (om-make-font def-face (nth 3 sizes))) (:font1b (om-make-font def-face (nth 0 sizes) :style '(:bold))) (:font2b (om-make-font def-face (nth 1 sizes) :style '(:bold))) (:font3b (om-make-font def-face (nth 2 sizes) :style '(:bold))) (:font4b (om-make-font def-face (nth 3 sizes) :style '(:bold))) (:gui (apply #'om-make-font gui-font)) (:score (apply #'om-make-font score-font)) (:mono (apply #'om-make-font mono-font)) (otherwise (om-make-font def-face (nth 0 sizes)))))) (when face (setf font (gp::augment-font-description font :family face))) (when size (setf font (gp::augment-font-description font :size size))) (when style (setf font (gp::augment-font-description font :slant (if (member :italic style) :italic :roman) :weight (if (member :bold style) :bold :normal)))) font)))
Hi -- thanks for the feedback. If I read corrrectly what you did is changing "Calibri" for "Tahoma" as default font face, and no changes in sizes: is that correct ?
I have read that "Segoe UI" is the most widespread font used on recent Windows. Would you mind giving it a try ?
The only font I'm not sure of is monospace font -- how can I test it?
the default font :mono
is used in the "Lisp code" panel that you can open at the right of the main patch editors, or in the list of open files of the main session window, under the "Documents" tab.
Also, there was no picture attached to your post: could you try to attach it again ?
Picking up on this, what do you want me to do next?
Thanks :)
Here is what is currently planned for the next release:
(defparameter *def-font*
#+macosx '("Lucida Grande" (11 12 14 16 20))
#+mswindows '("Segoe UI" (8 9 10 12 14))
#+linux '("Liberation Sans" (9 10 11 12 15))
)
I hope to improve font management in the future, but in the meantime I would like to ship v1.3 with a correct solution, within the current system.
The Linux 4K issue isn’t the font size — it’s the height (especially) and width (perhaps) of the frames within which the text is visible. Earlier versions of Ardour had the same issue but it was fixed. I don’t know how but I suspect that it was done by allowing Gnome to deal with issue rather than by hardwiring the size of the text frame.
Sent from my iPhone
On Apr 24, 2021, at 9:09 AM, Jean Bresson @.***> wrote:
Thanks :)
Here is what is currently planned for the next release:
(defparameter def-font
+macosx '("Lucida Grande" (11 12 14 16 20))
+mswindows '("Segoe UI" (8 9 10 12 14))
+linux '("Liberation Sans" (9 10 11 12 15))
) On Windows, you could check if this works on your HiDPI On Linux, I guess it doesn't: you could try and see if another list of sizes would do the trick to display "normal". The more important is the first size in the list: almost everything in the OM# UI is on that size. I hope to improve font management in the future, but in the meantime I would like to ship v1.3 with a correct solution, within the current system.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
As far as I can say from the picture linked to the initial post of this thread, the fonts do seem too big. Frame sizes are just pixel size and not really dependent on the font that is being used inside. If they were bigger in this picture, enough to let the text fit in, they would overlap each other...
There are some problems with HiDPi screens. For example font sizes on consecutive lines are correct, but line heights themselves are not (see this). Some boxes are scaled, mainly non visual, non icon boxes, such as
first
, some are not.om# should be able to scale its interface consistently, based on the
GDK_DPI_SCALE
environment variable. I think most of this scaling is taken care of by GDK itself, that's why same elements of the gui are properly scaled while some are not.