Re: Oddities and possibile enhancements of :postscriptname pattern with partial matches

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

 



On Wed, Dec 4, 2024 at 8:54 AM Francesco Pretto <ceztko@xxxxxxxxx> wrote:
> Ok, maybe now I get it, and what I missed is that prioritized
> "objects" are not evaluated unless the ones before produced same
> score. Is it possible that priorities in the documentation
> (https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#AEN21)
> are not in sync with actual priorities in the code
> (https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/src/fcmatch.c?ref_type=heads#L323)

They aren't the order of the priority though, Sure. Let me think about it.

> ? If so the only thing I still don't understand is why :postcriptname
> partial matched fonts with different styles disappear from the sorted
> list returned by "fc-match -s", except from the one that was selected
> with higher priority. If they were all present I would still be able
> to re-filter the sorted list, looking for the desired style, but as it
> is now it seems only one font per family can be returned (this is more
> evident in my testbed [1]).

That is the design. What you want would be "fc-match -a".

> In general the situation is a bit unfortunate, because FC is a font
> matching system with valuable qualities, but as it is now I can't
> tweak it to express some simple (although unorthodox) queries. I
> would RFE also this, but I think the "comma" normalization below has
> much more priority for me, and let you think if in the future the
> object priority list could be allowed to be altered so that my query
> becomes possible.

Yes, I'm pondering implementing that feature.

> No, I haven't found actual fonts with a postscript name like that, but
> many PDF(s) will still hint a postscript like name that has that comma
> convention. This means that trying to locate a font using a :postscriptname
> match will fail with FontConfig. PDF(s) usually have embedded fonts but
> there are some legit cases where the font is not embedded and must be
> located on the system.

I see.

> > However there are no such families of "Liberation"
> > available. thus it will be marked as the lowest score.
>
> Ok. I guess that there's also no similarity/partial match for family name.

It will more or less affect a score though, in a narrow sense, no.

-- 
Akira TAGOH




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

  Powered by Linux