dbmdz / mirador-textoverlay

Text Overlay plugin for Mirador 3
https://mirador-textoverlay.netlify.com/
MIT License
50 stars 13 forks source link

Hebrew support in mirador-textoverlay #150

Open miriamg16 opened 3 years ago

miriamg16 commented 3 years ago

Hello I'm trying to implement the 'mirador-textoverlay' plugin to integrate ALTO files In the Mirador, to view a transcription of the image

It seems to me that there is a problem with Hebrew support Or there is another definition that needs to be defined.

I check on the demo site https://mirador-textoverlay.netlify.app/ with this manifest https://vf.genizah.org/testManifest/FL45509099/manifest.json That has an ALTO file (the reference to it is in the manifest) https://vf.genizah.org/testManifest/FL45509099/FL45509099_Alto.xml

The problem is that it looks really bad, I attached a screenshot. Capture

I would be happy for any help!

miriamg16 commented 3 years ago

sorry' this is the screenshot

Capture

jbaiter commented 3 years ago

Thanks for reporting, I started working on improved Hebrew support a few months ago, but then I got sidetracked with other stuff and now I'm on parental leave until autumn, I'll probably pick up where I left then, it's currently unlikely that I'll get bored until then :upside_down_face: It'll probably come together with improved Arabic support, which has the same problems (improved CJK support is a bit further down the road, currently lacking testing data).

Preview: https://twitter.com/jbaiter_/status/1361083483783901185

If you need the improved Hebrew support earlier than that, I can push a branch, but it's very much WIP and has a few warts.

miriamg16 commented 3 years ago

Greetings I tried to take the version you entered, at the request of Daniel Stockel (who helps us):

But the first example does not look good: the text does not show, only the polygon of each line. Screenshot attached I would love to know what the problem is, or get a version update

image Regards

jbaiter commented 3 years ago

You are using Chrome or another WebKit based browser like Safari, correct? In the current branch Hebrew only works with Firefox. I'm currently working on getting it to run with WebKit/Chrome, but it's not looking good due to this bug that only seems to have been fixed for upcoming versions of Chrome/WebKit: https://bugs.chromium.org/p/chromium/issues/detail?id=374526 This bug affects any RTL script (like Hebrew) with a polygonal baseline. I've tried to find a workaround, but to no avail so far. In the worst case, there remains only the option not to render RTL text on polygonal baselines in Chrome/WebKit, but instead on a regular baseline, i.e. depending on the source material, the render might be severely sub-par, especially if there are only line-coordinates available. It's still going to be a while before I can release a version with proper support for RTL text, sorry :-/ In the meantime, maybe give Firefox with the current branch version a shot?