Re: Font Rendering: Multiple FT_Faces and baselines

2023-07-19 Thread Lawrence D'Oliveiro
On Thu, 20 Jul 2023 01:03:54 +, takase1121 via FreeType users wrote: > ... calculate an "average" baseline and align to that ... Or align to the midpoints of the overall font glyph boxes (including font ascent and font descent). That may be a suitable compromise.

Re: Font Rendering: Multiple FT_Faces and baselines

2023-07-19 Thread Werner LEMBERG
> I'm aware that when drawing text, all glyphs should be aligned on a > single baseline. The example I've given does not do this; it aligns > the text on different font's baseline, causing the inconsistent > look. This is what I told you in the very beginning: Your logic to position the glyphs

Re: Font Rendering: Multiple FT_Faces and baselines

2023-07-19 Thread Werner LEMBERG
[It would be nice if you could use a decent e-mail writer that creates readable plain-text messages (which we prefer on this mailing list), without completely garbling quoted material.] > > This looks like a logic error in your program. If I say `ftdump > > cjk.otf` I get > > > > ``` > >

Re: Font Rendering: Multiple FT_Faces and baselines

2023-07-19 Thread takase1121 via FreeType users
Hi, Thank you for pointing it out. I'm unsure about the strategy to align the baselines. The simplest would be aligning to the lowest / highest baselines, but that may break some faces. The other method would be the one I mentioned - calculate an "average" baseline and align to that, but it

Re: Font Rendering: Multiple FT_Faces and baselines

2023-07-19 Thread takase1121
Hi, Sorry for the mess of emails. This is my first time using a mailing list, and I'm still getting the hang of it. I'm aware that when drawing text, all glyphs should be aligned on a single baseline. The example I've given does not do this; it aligns the text on different font's baseline,

Re: Strange hinting of precomposed character

2023-07-19 Thread Brad Neimann
A long time ago I had some grad students write a compiler infrastructure for TrueType bytecode. Maybe it's mostly bit-rotted, but if someone were interested in working on this, I could try to help. When I get some time, I’d be happy to look into this. I’ve been doing some compiler-adjacent stuff

Re: Strange hinting of precomposed character

2023-07-19 Thread Patrick Lam
Yep! https://github.com/wenzhuman/fonttools On Wed, Jul 19, 2023 at 5:17 PM Werner LEMBERG wrote: > > > > A long time ago I had some grad students write a compiler > > infrastructure for TrueType bytecode. > > Ah, I faintly remember :-) > > > Maybe it's mostly bit-rotted, but if someone were

Re: Strange hinting of precomposed character

2023-07-19 Thread Patrick Lam
There is also a couple of masters theses: https://uwspace.uwaterloo.ca/bitstream/handle/10012/9116/Man_Wenzhu.pdf https://uwspace.uwaterloo.ca/bitstream/handle/10012/14262/Liu_Zeming.pdf?sequence=3=y Happy to answer questions! pat On Wed, Jul 19, 2023, 7:41 PM Brad Neimann wrote: > A long

Re: Strange hinting of precomposed character

2023-07-19 Thread Werner LEMBERG
> Yep! https://github.com/wenzhuman/fonttools Thanks. Unfortunately, this lacks top-level documentation, AFAICS, describing the changes in comparison to upstream 'fonttools'. Additionally, the git clone uses the 'master' branch for changes, which is problematic. It would be great if someone

Re: [MPEG-OTSPEC] COLRv1 to gray/alpha question (& color-blindness question)

2023-07-19 Thread Laurence Penney
This is far from a complete answer to your question, but please bear in mind that COLRv1 has been proposed and demonstrated as a solution to problems with certain variable monochrome fonts. In particular it can be very convenient to vary the shape of a masking contour using variations, in order

Re: COLRv1 to gray/alpha question (& color-blindness question)

2023-07-19 Thread Alexei Podtelezhnikov
Hin-Tak, > This is probably both a spec question & a technical question. What is the > recommendation for COLRv1 when the rendering target media is not capable of > color? Are you asking about RGB to gray conversion? There are multiple specs with slightly different formulas and barely

Re: COLRv1 to gray/alpha question (& color-blindness question)

2023-07-19 Thread Alexei Podtelezhnikov
> > Hin-Tak, > > > This is probably both a spec question & a technical question. What is the > > recommendation for COLRv1 when the rendering target media is not capable of > > color? > > > > Are you asking about RGB to gray conversion? There are multiple specs with > > slightly different

Progress update on adjustment database

2023-07-19 Thread Craig White
The next thing I'm doing for the adjustment database is making combining characters work. Currently, only precomposed characters will be adjusted. If my understanding is correct, this would mean finding any lookups that map a character + combining character onto a glyph, then apply the

Re: COLRv1 to gray/alpha question (& color-blindness question)

2023-07-19 Thread Hin-Tak Leung
On Wednesday, 19 July 2023 at 15:27:20 BST, Alexei Podtelezhnikov wrote: > Hin-Tak, > This is probably both a spec question & a technical question. What is the > recommendation for COLRv1 when the rendering target media is not capable of > color? > Are you asking about RGB to gray

Adobe's SVG native as ft2 renderer hook (Re: Bug in rsvg+cairo hook with Nabla?

2023-07-19 Thread Hin-Tak Leung
On Wednesday, 19 July 2023 at 05:07:42 BST, Werner LEMBERG wrote: > >> ... please post a link to the report if you do so :-) > https://gitlab.gnome.org/GNOME/librsvg/-/issues/997 > By the way, is there any progress whether Adobe's compact SVG native > viewer library can be used as a

The COLRv1 hook code (Re: FT_Bitmap and FT_BitmapGlyph life cycles)

2023-07-19 Thread Hin-Tak Leung
Perhaps it is easier just to show you what I have - this is already functional and I can even switch COLRv1 palettes in ftgrid (screenshots the usual place). Basically it works the same ways as svg hooks: the preset slot hook calculates the bound boxes, while the render hook actually draws to

Re: Strange hinting of precomposed character

2023-07-19 Thread Patrick Lam
Yes, all that would be good. I think that Behdad had mentioned it at some point with the fonttools maintainers, but this is all quite a long time ago now. pat On Wed, Jul 19, 2023 at 11:26 PM Werner LEMBERG wrote: > > > > Yep! https://github.com/wenzhuman/fonttools > > Thanks. Unfortunately,

Re: Adobe's SVG native as ft2 renderer hook (Re: Bug in rsvg+cairo hook with Nabla?

2023-07-19 Thread Hin-Tak Leung
Adobe's SVG native is half way between librsvg and skia's svg rendering. Screenshots of 3 at https://github.com/HinTak/harfbuzz-python-demos/tree/master/skia-adventure And diff against the skia-port code in the ../svg-native/ directory above, and a lot more screenshots. It shouldn't be hard to