<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Preserve binding when preparing patterns"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90330#c22">Comment # 22</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Preserve binding when preparing patterns"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90330">bug 90330</a>
from <span class="vcard"><a class="email" href="mailto:bugs.freedesktop@karlt.net" title="Karl Tomlinson <bugs.freedesktop@karlt.net>"> <span class="fn">Karl Tomlinson</span></a>
</span></b>
<pre>(In reply to Behdad Esfahbod from <a href="show_bug.cgi?id=90330#c20">comment #20</a>)
<span class="quote">> <prefer> seems to only be used currently to implement virtual families
> (sans, serif, etc).</span >
<span class="quote">> So, <prefer> currently happens without binding="same". I guess it should.
> Generally, sounds like <accept> and <prefer> should go with binding="same",
> whereas <default> shouldn't. Does that sound about right?</span >
When using <prefer> with sans-serif, etc., the weak binding is important and
so I assume intentional.
If the app asks for "sans-serif", then the behavior with weak is that the font
provided supports the language. binding="same" would remove that behavior and
always return the same font regardless of language.
I suspect that bindings don't map well to prefer/accept/default because
bindings are about whether language support should take priority.
prefer/accept/default determine order amongst existing families of the same
binding (though I'm not sure that the behavior of always preferring all strong
families over any weak families is intentional).
Adding a "no match" binding for use in FcFontRenderPrepare may still be a way
to provide the useful information that the font didn't match the family at
all. I can't think of a conflict with existing binding usage.
<span class="quote">> If user asked for "sans", however, it would be useful to tell them that
> indeed what we returned is the preferred sans font...</span >
I think it is sufficient to distinguish "weak" for preferred font for this
language, and "no match" for random font which may or may not support the
language.
binding="same" is often important, however, to ensure that a weak
<accept> doesn't behave like a <default>.
<span class="quote">> <alias binding="same">
> <family>Nimbus Sans</family>
> <default>
> <family>Helvetica</family>
> </default>
> </alias>
>
> I think the default should be accept instead.</span >
Probably (without checking how that interacts with other aliases in that
file), because I assume the intention is that, if an app asks for "Nimbus
Sans", "Some fallback font", then the priority should be "Nimbus Sans",
"Helvetica", "Some fallback font", rather than the current "Nimbus Sans",
"Some fallback font", "Helvetica". Perhaps there are counter examples, but
accept and default at least provide some degree of choice in behavior.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>