[HarfBuzz] HarfBuzz-JS?

Rolf Langenhuijzen rolf.langenhuijzen at xs4all.nl
Tue Sep 4 11:40:19 PDT 2012


Hello Lorant,

I can't speak for Behdad but I think the purpose of Harfbuzz is not directly the out of the box tool for layout/rich text. You could be a tool on top of Harfbuzz for that though I guess, and/or maybe Pango was/is more suited for this(?). So also breaking lines is not is not something that Harfbuzz does.
Harfbuzz supports the OT features/scripts that the font supports and that combined with a rendering/rasterization engine like FreeType you can create the output in various formats. Have you tried to run it on a server just to see how you can use it?

I could be wrong though with my answers to your questions.

As for a JS version, I'm all for it, but I looked at it a bit more seriously about a year ago and was in over my head. I'm no C/C++ programmer you see, so then it's a bit difficult to "use" stuff like emscripten, plus I thought if it was ever going to work that it would be very slow or kill someone's browser. However, maybe I'm totally wrong :)
I will check out some resources again and if I can contribute in any way I will.

Best,
Rolf


On Sep 4, 2012, at 1:36 PM, Lóránt Pintér wrote:

> Hi Behdad,
> 
> Thanks for the quick response. We were also considering using emscripten, but with FreeType it looked too slow. With only HarfBuzz it might just work, though. Will look into this.
> 
> Having the UCDN project is really cool. When do you plan to integrate it with HarfBuzz? Is there a way I can make HarfBuzz use it already?
> 
> I have a few other questions about how to use HarfBuzz for our needs:
> Are there best practices to layout rich text, where fonts/colors/underlines/etc. can mix?
> Is HarfBuzz capable of breaking lines at a certain width? Or is this something that I would have to do?
> Does it support OpenType features like Optical Bounds that work with line bounds?
> Is there a list of features/languages/scripts supported by HarfBuzz somewhere?
> -- 
> Thanks,
> Lorant
> 
> On Tuesday, September 4, 2012 at 2:15 AM, Behdad Esfahbod wrote:
> 
>> On 09/03/2012 08:44 AM, Lóránt Pintér wrote:
>>> Hi,
>> 
>> Hi,
>> 
>>> The company I work for is developing a multi-platform tool that needs proper
>>> layout of text for all kinds of scripts and languages. Using HarfBuzz looks
>>> really promising, but we need to have a solution that works across platforms,
>>> including browsers and stuff. Do you know of a solution similar to HarfBuzz
>>> that can do OpenType text layouting that can be used from, say, JavaScript?
>>> 
>>> If there is no such solution, we would be willing to port as much of HarfBuzz
>>> as feasible to JS, and maintain the port further on as an open-source project.
>>> Would you be interested in helping us create such a port?
>> 
>> I've been planning to experiment with this myself, but will be happy to see
>> others do instead. I also think using emscripten makes most sense right now.
>> FreeType compiles through emscripten easily. Before, we didn't have a
>> light-weight Unicode-callbacks implementation, but now there is the ucdn [1].
>> So, it's a matter of putting the three pieces together and wiring it up to
>> HTML5 canvas. Definitely possible.
>> 
>> behdad
>> 
>> [1] https://github.com/grigorig/ucdn
> 
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20120904/40743dde/attachment.html>


More information about the HarfBuzz mailing list