[GSoC2017: Harfbuzz] Report #3

Hi all,

This is my first post during the coding period of GSoC 2017. I have been working on a demo application which renders text using the harfbuzz library.The work on application started before the coding period. You can find the application here.


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/digib0y/2017-06-22_gsoc2017_harfbuzz_report_3/

The arabic sentence is correctly rendered. thanks for working on this, it was much needed.

Thanks :slight_smile:
I have fixed the no space error too!
You can take a look at perfectly rendered arabic now :wink:

Yes, indeed, it was rather quick for you to get these languages already properly rendering, impressive!
BTW, what can we do with your demo app? i compiled it but i couldn’t do anything with it, it just shows the same picture as the screenshot.

This app is just supposed to display what you see :slight_smile:
You can use the code from the application and re-use in other applications too.
I will soon work to integrate Harfbuzz library into app_server and probably extend BeOS API.
After that, you will be able to use that in Haiku applications and AFAIK for RTL support in Haiku we need to need to lot of changes(my initial idea for GSoC was to implement RTL in Haiku) but for now I can work on them after GSoC.

The Han / Chinese characters are rendered pretty nicely, though the font is like using Times New Roman (its look) or Comic Sans (the cancerous aspect) for UI. No matter the font rendering, if that font in the image becomes the CJK UI font for Haiku, it’ll look as bad as Windows 9x for a CJK user.
Noto CJK is a very good generic font for UI.

Font isn’t a concern we can change it as per the requirements. I changed the font to NotoSansCJKsc in the app and came up with this

I hope it looks good now :slight_smile:

The French word renders fine, although it is a bit unusual to see beautiful typography and ligatures like this in a GUI (most other OS seems to not bother with it!). We’ll see how it looks once integrated in the GUI.

The Russian text looks good (even if it makes no sense). However, the more advanced features are not shown. Most notably, the accents sometimes used in texts for children. You can use the following text for Russian rendering (the font should have the right accents position, Doulos SIL or EB Garamond 12 do this): “А́нна де́лится я́блоком с И́горем.”

Here is the russian text in EBGaramond12 :slight_smile:

Good to see the position of accent mark is context dependent. The accents above capital letters seem too close to them (however other renders place them in similar positions), but the third word “я́блоком” places the accent after the letter “я”, not above it. This is different for the second word “де́лится” where the accent is correctly placed above “е”.

Just observed it, other renders also misplace the accent on “я”. So, it is font issue, not render’s. Can you try it with Doulos SIL font (http://software.sil.org/doulos/download/)?

It renders properly with Doulos SIL.
I have updated the application and push the changes to GitHub.
You can take a look here.

With Doulos SIL font, the Russian text is rendered wonderful! Thank you.

Any more progress with harfbuzz?

No, unfortunately the student was failed after the first month, as we didn’t feel confident that he had the required skills to understand the code of app_server and succesfully integrate his work there.

That’s too bad, i guess there 's still alot of work to get it integrated with the app_server?

Yes, in fact Stippi (who was mentoring this project) wrote the test application on his side to make sure there was not any hidden problems. It took him about two evenings or so, while the student struggled on it for about a month.

Nothing was done as far as integrating it into app_server, at all.

We will review our selection process for GSoC and be stricter about the “you must submit a working patch during the application process” rule to avoid such things next times.

I just wanted to chime in and point out that Stippi is a old contributor, who has contributed for over 12 years or so if I am not wrong. He is the one who wrote most of the code of app_server. He was also the developer responsible for Haiku’s icon creation tool, Icon-O-Matic, and integrating Haiku’s own format of scalable vector graphics. A freshmen year student will take time to get a hang of API’s, text rendering, etc.

I did complete my task which was mentioned in the proposal for the community bond period and the first month of coding during GSoC. Well, for now I am involved with some other research.

I will try to complete this project in my winter break.