<div dir="ltr">Hi York.<div><br></div><div>The example provided <a href="https://github.com/Robmaister/SharpFont.HarfBuzz/blob/master/Source/SharpFont.HarfBuzz.Example/Program.cs">there</a> (which <a href="https://github.com/Robmaister/SharpFont.HarfBuzz/commits/cf33e1aca4fce77d6554d234d1d0eb5e4447a750/SharpFont.HarfBuzz.Example/Program.cs">I wrote</a> years ago 😊) is really all what you need from harfbuzz most of the cases, <a href="https://github.com/Robmaister/SharpFont.HarfBuzz/blob/cf33e1aca4fce77d6554d234d1d0eb5e4447a750/SharpFont.HarfBuzz.Example/Program.cs#L30-L35">providing a font, a string and its direction/language</a> and calling harfbuzz to do all the hard works you've mentioned. But surely HarfBuzz isn't enough for a complete text rendering stack so it is suggested to not use harfbuzz directly everytime and use a higher level libraries like Pango. There is <a href="https://github.com/zwcloud/PangoSharp">a C# binding</a> for Pango and you can find more which I guess you will find just easier to use.<br></div><div><br></div><div>If the features you've mentioned is not default enabled when you used harfbuzz, you should however go a little deeper and help on completing the binding to support related APIs.</div><div><br></div><div>"Which APIs are relevant?" most of the cases "hb_shape" is enough (font.Shape(buf) in C# case). See <a href="https://github.com/harfbuzz/harfbuzz-tutorial">this</a> also.</div><div><br></div><div>"Does the "direction"/"script"/"language" passed to HarfBuzz automatically set some features?" yes.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 14, 2018 at 7:23 PM York Todd <<a href="mailto:tjysunset@outlook.com">tjysunset@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div text="#000000" bgcolor="#FFFFFF">
<p>Hello everyone,</p>
<p>I'm working on a Han/Latin text layout & rendering program for personal use, in C# with FreeType as font provider. New to both HarfBuzz and typography, and the nasty CTL.</p>
<p>The goal is to use various CJK/Latin related OpenType features in shaping, at user's (my) choice. To name a few,
<a href="https://helpx.adobe.com/typekit/using/open-type-syntax.html#vert" target="_blank">
vert</a>, <a href="https://helpx.adobe.com/typekit/using/open-type-syntax.html#pwid" target="_blank">
pwid</a>, <a href="https://helpx.adobe.com/typekit/using/open-type-syntax.html#liga" target="_blank">
liga</a> and <a href="https://helpx.adobe.com/typekit/using/open-type-syntax.html#onum" target="_blank">
onum</a>.<br>
</p>
<p>Sorry if it's already documented somewhere, but <a href="https://harfbuzz.github.io/shaping-and-shape-plans.html" target="_blank">
the docs at harfbuzz.github.io</a> seems unfinished, google search returned nothing relevant, examples at GitHub wiki didn't even mention about OpenType features, even the
<a href="https://github.com/Robmaister/SharpFont.HarfBuzz" target="_blank">
C# binding</a> I'm using has a incomplete set of API (think that I can still pinvoke HarfBuzz dll as a workaround though) :/</p>
<p>It would be nice if you could answer these (stupid?) questions:</p>
<ul>
<li>Does HarfBuzz simply take a list of OpenType features (or equivalent arguments) and shape them into the glyphs, or do I have to manually apply the features afterwards?
</li><li>Which APIs are relevant? </li><li>Does the "direction"/"script"/"language" passed to HarfBuzz automatically set some features?
</li></ul>
<p>Thanks in advance!</p>
<p>Todd<br>
</p>
<pre class="m_-6115996899065150416moz-signature" cols="72">-- 
Todd J. York (pseudonym)
zh-Hans-CN, en-US | UTC+08:00
Sent from Thunderbird</pre>
</div>

_______________________________________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org" target="_blank">HarfBuzz@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
</blockquote></div>