[Fontconfig-bugs] [Bug 71287] size specific design selection support in OS/2 table version 5
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jan 5 20:19:50 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=71287
--- Comment #9 from Akira TAGOH <akira at tagoh.org> ---
(In reply to comment #8)
> + lower_size = os2->usLowerOpticalPointSize / 20;
> + upper_size = os2->usUpperOpticalPointSize / 20;
>
> Float division instead?
Ah, you're right. fixed.
> + if (os2)
> + {
> + r = FcRangeCreateDouble (lower_size, upper_size);
> + if (!FcPatternAddRange (pat, FC_SIZE, r))
>
> If the range is not available (either old os2 or that the range is
> all-inclusive), then, NOT set size? That would preserve most
> backward-compatibility.
The default value for lower_size and upper_size is set to 0 and DBL_MAX as same
as freetype does for old os2 or the case where those properties are not
available. so should be no problem even with setting size. why we have to set
any value to SIZE would be rather not to get confused in the matcher because
it's the matter to affect the score now.
not sure for all-inclusive. after think of the use-case for bitmap fonts where
it may be more likely to see this situation, that sounds sane to behave like
this.
> + if (FcRangeIsInRange (r1, r2))
> + ret = 0.0;
> + else
> + ret = fabs (r1->u.d.end - r2->u.d.end);
>
> This sounds wrong. If not in-range, then we want min((r1.end - r2.start),
> abs(r1.start - r2.end)). No?
indeed. fixed.
> These don't make much sense. I suppose we can initially not implement any
> of these, and add as we need them.
Sure. not too much objection on it.
> I haven't done any testing or a full close review. It's a bit unsettling
> how much boilerplate changes we need for this. But, again, thanks for
> working on this.
Thank you for the comments!
http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=new-size-selection-mechanism-4
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20140106/9720b29d/attachment.html>
More information about the Fontconfig-bugs
mailing list