Re: X11 font size

2023-01-05 Thread Thomas Dickey via X11-users
On Thu, Jan 05, 2023 at 09:41:35PM +0100, René J.V. Bertin via X11-users wrote:
> On Wednesday January 04 2023 21:42:17 Peter Dyballa wrote:
> >
> >> Am 4.1.2023 um 21:00 schrieb Clark Souers:
> >> 
> >> How do I increase X11 font size on a Mac Big Sur 11.7.2? I am using 
> >> Xquartz 2.7.11. should I update to 2.82?
> >
> >There is, as far as I know, no such means. Each X client can have its own 
> >font at its own size. 
> 
> That's not the entire truth.  It does apply to legacy applications that use
> only X11 primitives for font rendering, but AFAIK libXft (`man Xft`) does
> provide a global scale factor representing the DPI resolution of the screen
> (or rather, entire desktop):

DPI resolution isn't the same as font size. Xft uses fontconfig for
managing this, as noted in the manual page:

https://invisible-island.net/xterm/xft/xft.html

 FC_DPI
  Dots/inch  used  for  resolution (default: computed from
  the display height).

https://www.freedesktop.org/software/fontconfig/fontconfig-devel/x19.html

dpiFC_DPI Double  Target dots per inch
size   FC_SIZEDouble  Point size

Font size is usually measured in points (not pixels/dots), because that
directly relates to how large the characters appear on the screen, rather
than how crisp they are.

(xterm does both types of fonts)

The Xft values are all implemented as properties via fontconfig
(actually, X resources).

xterm (and some other applications) get those via a call to
XftDefaultSubstitute:

https://gitlab.freedesktop.org/xorg/lib/libxft/-/blob/master/src/xftdpy.c#L481
 
> ```
> > xrdb -query | fgrep Xft
> Xft.antialias:  1
> Xft.autohint:   0
> Xft.dpi:86
> Xft.hinting:1
> Xft.hintstyle:  hintfull
> Xft.lcdfilter:  lcddefault
> Xft.rgba:   rgb
> ```

None of those resources deal with font _size_, but only provide help for
applications to display using a given size.  So there's no guarantee that
any two X applications are using the same font size (except of course for
the case where they're using the same toolkit, e.g., Qt).

-- 
Thomas E. Dickey 
https://invisible-island.net


signature.asc
Description: PGP signature
 ___
Do not post admin requests to the list. They will be ignored.
X11-users mailing list  (X11-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: font selection

2020-04-27 Thread Thomas Dickey via X11-users
On Mon, Apr 27, 2020 at 10:40:18AM -0400, James K. Lowden via X11-users wrote:
> I use mupdf on Ubutu on a VMware process on my MacBook Pro, via remote
> X on ssh. It works great, and I don't know why. Specifically, I don't
> know what font it uses.  How can I find out without tracing through the
> code in gdb?  
> 
> mupdf uses OpenGL, but on a headless virtual machine, OpenGL devolves
> to simple X11 using GLUT and xlib.  Therefore, I should be able to
> produce a window with identical text and font using xlib directly.  But
> no amount of experimentation and intuition using xfontsel has yielded a
> font that looks anywhere near as good as what mupdf displays.  
> 
> It might be more than a matter of simply choosing the right font
> (although one must nearly always start somewhere).  I don't think it's
> anything too fancy.  For example, there's no xrandr support: 
> 
>   $ xrandr --listproviders
>   Providers: number : 0
> 
> The xtrace listing looks very much like the ltrace listing.  It barely
> mentions fonts, and it says it ... uses pointers: 

If it's using TrueType fonts, those won't be (very) noticeable in
xtrace listings, since those are drawn on the client side.

(If this were some other platform, strace, ktrace or truss would be
a suitable tool to see which files are opened, but MacOS seems to have
made that harder).

According to the package description,

https://packages.debian.org/sid/mupdf

it does use freetype2 (which has a debugging trace -- _not_ enabled in the
packaged version).  It doesn't appear that harfbuzz has a user-enable-able
trace either.  However, if you're able to use strace on the Ubuntu machine
to trace the mupdf process, you'll probably find the information needed.

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: PGP signature
 ___
Do not post admin requests to the list. They will be ignored.
X11-users mailing list  (X11-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: xterm operation not permitted

2020-02-07 Thread Thomas Dickey via X11-users
On Thu, Feb 06, 2020 at 09:30:52PM -0500, Jonathan Prescott wrote:
> As a data point, if it is relevant, rxvt has always worked from El Capitan, 
> which was when I bought this Mac, to Catalina today.  Not sure if that is 
> important, but, it is an observation.  ETerm was not working, but, I haven’t 
> upgraded it since the MacPorts upgrade.  I normally used Apple’s Terminal, 
> and iTerm, but, xterm, et al, are useful once in awhile, which why I keep 
> them around.
> 
> Another point, the last time I installed xterm prior to today, the operating
> system was Catalina 10.15.2.  When I upgraded MacPorts today, my machine had
> been upgraded to 10.15.3 in the interim.  Your point about potential point
> upgrade to the devices fixing the bug could be on point.

yes - would be nice if Apple provided release notes...

In a quick check, I see that the MacPorts package for urxvt uses these
functions:

posix_openpt
grantpt
ptsname
unlockpt

while xterm uses this:

openpty

The actual choice depends on the configure script, but it is optional:

Patch #292 - 2013/04/25
 * add   configure   option   --disable-openpty  to  control  whether
   openpty() may be used in preference to posix_openpt().
 * improve  workaround  from [451]patch #279 for BSD systems which do
   not complete initialization until both sides of the pseudoterminal
   are  opened,  by preferring openpty() function over posix_openpt()
   when available (report by Christian Weisgerber).

That bug report referred to MacOS, and because it related to timing
(which will be different between different terminal programs), one
may "work" while another has unexpected behavior.

> Jonathan
> 
> > On Feb 6, 2020, at 8:37 PM, Thomas Dickey  wrote:
> > 
> > On Thu, Feb 06, 2020 at 10:37:34AM -0500, Jonathan Prescott wrote:
> >> Well, let’s just say that, on MacOS Catalina 10.15.3, the xterm I had
> >> installed, the latest at the time from MacPorts, failed in the way everyone
> >> has been noting lately.  I did my periodic update of MacPorts, and I 
> >> noticed
> >> that xterm was updated this cycle.  After the MacPorts update, xterm worked
> >> like everyone is expecting.  Now, whether it was xterm that was fixed, or 
> >> an
> >> X11 related library (that’s all I use MacPorts for), I couldn’t tell you. 
> >> However, it was not a change in the operating system, or XQuartz (not X11
> >> server), since these didn’t change.
> > 
> > I don't know - since nothing relevant changed in xterm (it's been almost
> > all font-related/display-related things in the past year).
> > 
> > A few years ago someone had a problem with those symptoms which was
> > apparently due to MacOS/OSX associating permissions to the _pseudo 
> > terminal_.
> > 
> > In a quick check, it seems I last revised that in 2011.
> > 
> > I upgraded one of my machines to Catalina in October to investigate this
> > (there are a couple of pty-interfaces which _could_ be used, and possibly
> > Apple's broken a different one in Catalina), but found no corresponding
> > problem (but that one started as Mohave - upgrades from older releases,
> > I think, accumulate crud that Apple doesn't cleanup).
> > 
> > If the problem is related to file-permissions (and acls), I suppose
> > it's also possible that an unrelated upgrade will replace some
> > file and suddenly relieve some bug.  But I don't know to advise you
> > on that -- only on things that I can reproduce :-)
> > 
> >> Jonathan
> >> 
> >>> On Feb 6, 2020, at 3:54 AM, Thomas Dickey  wrote:
> >>> 
> >>> - Original Message -
> >>> | From: "Apple X11 Users' List" 
> >>> | To: "David Ledger" 
> >>> | Cc: "Apple X11 Users' List" 
> >>> | Sent: Wednesday, February 5, 2020 9:35:37 PM
> >>> | Subject: Re: xterm operation not permitted
> >>> 
> >>> | I just updated my MacPorts distribution, and the new xterm seems to 
> >>> have been
> >>> | fixed so that it works on Catalina as you would expect.
> >>> | Jonathan
> >>> 
> >>> that's not due to a change in xterm, but some permissions bug in the 
> >>> pseudo-terminal support.
> > 
> > -- 
> > Thomas E. Dickey 
> > https://invisible-island.net 
> > ftp://ftp.invisible-island.net 

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: PGP signature
 ___
Do not post admin requests to the list. They will be ignored.
X11-users mailing list  (X11-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: xterm operation not permitted

2020-02-06 Thread Thomas Dickey via X11-users
On Thu, Feb 06, 2020 at 10:37:34AM -0500, Jonathan Prescott wrote:
> Well, let’s just say that, on MacOS Catalina 10.15.3, the xterm I had
> installed, the latest at the time from MacPorts, failed in the way everyone
> has been noting lately.  I did my periodic update of MacPorts, and I noticed
> that xterm was updated this cycle.  After the MacPorts update, xterm worked
> like everyone is expecting.  Now, whether it was xterm that was fixed, or an
> X11 related library (that’s all I use MacPorts for), I couldn’t tell you. 
> However, it was not a change in the operating system, or XQuartz (not X11
> server), since these didn’t change.

I don't know - since nothing relevant changed in xterm (it's been almost
all font-related/display-related things in the past year).

A few years ago someone had a problem with those symptoms which was
apparently due to MacOS/OSX associating permissions to the _pseudo terminal_.

In a quick check, it seems I last revised that in 2011.

I upgraded one of my machines to Catalina in October to investigate this
(there are a couple of pty-interfaces which _could_ be used, and possibly
Apple's broken a different one in Catalina), but found no corresponding
problem (but that one started as Mohave - upgrades from older releases,
I think, accumulate crud that Apple doesn't cleanup).

If the problem is related to file-permissions (and acls), I suppose
it's also possible that an unrelated upgrade will replace some
file and suddenly relieve some bug.  But I don't know to advise you
on that -- only on things that I can reproduce :-)
 
> Jonathan
> 
> > On Feb 6, 2020, at 3:54 AM, Thomas Dickey  wrote:
> > 
> > - Original Message -
> > | From: "Apple X11 Users' List" 
> > | To: "David Ledger" 
> > | Cc: "Apple X11 Users' List" 
> > | Sent: Wednesday, February 5, 2020 9:35:37 PM
> > | Subject: Re: xterm operation not permitted
> > 
> > | I just updated my MacPorts distribution, and the new xterm seems to have 
> > been
> > | fixed so that it works on Catalina as you would expect.
> > | Jonathan
> > 
> > that's not due to a change in xterm, but some permissions bug in the 
> > pseudo-terminal support.

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: PGP signature
 ___
Do not post admin requests to the list. They will be ignored.
X11-users mailing list  (X11-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: xterm operation not permitted

2020-02-06 Thread Thomas Dickey via X11-users
- Original Message -
| From: "Apple X11 Users' List" 
| To: "David Ledger" 
| Cc: "Apple X11 Users' List" 
| Sent: Wednesday, February 5, 2020 9:35:37 PM
| Subject: Re: xterm operation not permitted

| I just updated my MacPorts distribution, and the new xterm seems to have been
| fixed so that it works on Catalina as you would expect.
| Jonathan

that's not due to a change in xterm, but some permissions bug in the 
pseudo-terminal support.

-- 
Thomas E. Dickey 
http://invisible-island.net
ftp://ftp.invisible-island.net
 ___
Do not post admin requests to the list. They will be ignored.
X11-users mailing list  (X11-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com