[dev] possible patch for font information

From: Greg Minshall <minshall_AT_umich.edu>
Date: Mon, 23 Sep 2024 12:38:35 +0300

hi. i was trying to figure out which font st(1) was using in some
configuration i was running it in.

i created the following (INCOMPLETE!!) patch to print out messages when
what the user requested and what is ended up being used are different.

for example, with the patch
----
st fc4*​ ❯ ./st -f adflkjdsf
font mismatch: instead of family "adflkjdsf"; we got family "Noto Sans"
font mismatch: instead of family "adflkjdsf"; we got family "Noto Sans"
font mismatch: instead of family "adflkjdsf"; we got family "Noto Sans"
font mismatch: instead of family "adflkjdsf"; we got family "Noto Sans"
----
the incompleteness is, at least partially, from these issues:
- should it always check?  #ifdef?  command line option?
- what fields should it look at?
  - currently it looks at "familiy", "style", and "size".  there are
    many others
  - possibly, one can look at the user's pattern and use some FcP...()
    routine to extract *all* the fields the user specified, and look at
    those
- when during the start up should it be called?  (maybe there's
  somewhere where it won't report the same information four times, for
  example.)
- *how* should it present any discrepancies it finds to the user?
  - right now, it does `fprintf(stderr...)`.  that isn't likely of much
    help, especially if launched from a window manager (where stderr
    probably doesn't get shown to the user, sadly)
- and, obviously, is this even useful.
cheers, Greg
Received on Mon Sep 23 2024 - 11:38:35 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 23 2024 - 12:12:09 CEST