Re: Difficulty finding a font file through the libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


apache has a nologin shell, so sudo -i does not work.

The client’s font directory path is in /etc/fonts/local.conf as a <dir>…</dir> parameter within <fontconfig>. That is how gs finds the mass of fonts they have.

How does fc relate the file name of the font to the font’s internal name? Perhaps that is not important, but I don’t know how to explain why gs only matches on the .ttf.orig file, while the fc tools (fc-*) match on the .ttf file. The two files are identical and return identical md5 sums, and the only difference between them is the name. Ownership and permissions are the same on both files.

The linked config files in /etc/fonts/conf.d don’t make much sense to me, and I don’t know if they have anything to do with this.

For what it is worth, a 4096 debug of fc-match on the .ttf file is below.

Again, thanks,

   -- Michael

# export FC_DEBUG=4096 ; fc-match MoongladeDemo

Pattern has 24 elts (size 32), 24 elts (size 24)
        family: "MoongladeDemo"(s) "DejaVu Sans"(w) "Bitstream Vera Sans"(w) … many more … "Nimbus Sans Narrow"(w) ->  "Moonglade DEMO"(w)
        familylang: "en"(s) "en-us"(w) ->  "en"(w)
        style: (None) ->  "Regular"(w)
        stylelang: "en"(s) "en-us"(w) ->  "en"(w)
        fullname: (None) ->  "Moonglade DEMO Regular"(w)
        fullnamelang: "en"(s) "en-us"(w) ->  "en"(w)
        slant: 0(i)(s) ->  0(i)(w)
        weight: 80(i)(s) ->  80(f)(w)
        width: 100(i)(s) ->  100(f)(w)
        size: 12(f)(s) -> (None)
        pixelsize: 12.5(f)(s) -> (None)
        hintstyle: 1(i)(w) -> (None)
        hinting: True(s) -> (None)
        verticallayout: False(s) -> (None)
        autohint: False(s) -> (None)
        globaladvance: True(s) -> (None)
        dpi: 75(f)(s) -> (None)
        scale: 1(f)(s) -> (None)
        foundry: (None) ->  "PfEd"(w)
        file: (None) ->  "/var/www/ext/resources/fonts/2- Moonglade Regular DEMO.ttf"(w)
        index: (None) ->  0(i)(w)
        outline: (None) ->  True(w)
        scalable: (None) ->  True(w)
        charset: (None) ->
        0000: 00000000 ffffffff ffffffff 7fffffff 00000000 8112c37e 3f7fffbf bffeffbf
        0001: ffff7fff fef3cff3 fffbf3ff 7fffffff 00000000 00000000 00000000 00000000
        0002: 00000000 00000000 00000000 00000000 00000000 00000000 3f0002c0 00000000
        001e: 00000000 00000000 00000000 00000000 0000003f 00000000 00000000 00000000
        0020: 30000000 00010040 00000000 00000000 00000000 00001000 00000000 00000000
        0021: 00000000 00000004 00000000 00000000 00000000 00000000 00000000 00000000
        lang: "en"(w) ->  aa|af|ay|bi|br|bs|ca|ch|en|  …  |sg|sn|su|za(w)
        fontversion: 2147483647(i)(s) ->  65536(i)(w)
        embeddedbitmap: True(s) -> (None)
        capability: (None) ->  "otlayout:DFLT"(w)
        fontformat: (None) ->  "TrueType"(w)
        decorative: False(s) ->  False(w)
        namelang: "en"(s) -> (None)
        prgname: "fc-match"(s) -> (None)
        postscriptname: (None) ->  "MoongladeDEMO-Regular"(w)
        color: (None) ->  False(w)
        symbol: False(s) ->  False(w)
        variable: False(s) ->  False(w)
2- Moonglade Regular DEMO.ttf: "Moonglade DEMO" "Regular"

On Oct 28, 2021, at 20:07, Lawrence D'Oliveiro <ldo@xxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 28 Oct 2021 19:43:45 -0500, Michael Brennen wrote:

The production script runs as apache; there is no local fontconfig
directory. I ran the process with sudo -u apache, and it has the same
result: the font is found in the .ttf.orig file.

sudo also has the -i/--login option to make sure you run the command
more like a real login session as that user; may be worth adding that,
just in case.

Loading MoongladeDEMO-Regular font from
/var/www/ext/resources/fonts/2- Moonglade Regular DEMO.ttf.orig...

By the way, there must be an entry in the Fontconfig setup somewhere
that says to look in /var/www/ext/resources/fonts for fonts ... or is
this in the aforementioned Fontmap file?

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux