inception icon indicating copy to clipboard operation
inception copied to clipboard

Ability to upload and use a custom font for the annotated document

Open rohlik-hu opened this issue 3 years ago • 8 comments
trafficstars

We are annotating historical texts with some strange special characters which require the proper font to be readable. They are UTF8-encoded, but modern standard Unicode fonts are hard to read and lack some special chars from the private use area. Annotators are being slowed down and partially uncertain about some readings.

It would be desirable to be able to change the font of object language strings, including tokens and lemma information, to a user-defined one in the interface. The rest of the interface and annotations should remain in the respective modern font chosen in the web browser. Ideally, the administrator would be able to set the object language font for any given text or corpus.

I think this might be a useful feature for many users who work with texts in rarer scripts or understudied languages.

rohlik-hu avatar Nov 26 '21 13:11 rohlik-hu

Can it be expected that all users have the font installed on their machines? Would it be necessary or even possible to upload the font to the project so that the user's browsers could load it from the INCEpTION server?

reckart avatar Nov 26 '21 14:11 reckart

Good point, thank you! Actually, the second solution would be preferable. Generally, one cannot be sure that the users all have the right font at hand, but the administrator should.

Thanks a lot for taking this feature requests into consideration!

rohlik-hu avatar Nov 26 '21 14:11 rohlik-hu

Hi! May I ask how deep is this feature down the project backlog?

I have literally the same issue as above. I’m trying to adopt INCEpTION for annotating texts in Church Slavonic, which make extensive use of the Cyrillic Extended Unicode blocks to encode e.g. combining superscript characters. Without the proper font, some words become totally illegible or liable to be easily misinterpreted by the annotators.

ksnip_20220528-174645

vintagentleman avatar May 28 '22 14:05 vintagentleman

Which editor are you using? The brat based editor or another one?

reckart avatar May 28 '22 14:05 reckart

Yes, the screenshot above is from brat. AnnotatorJS has the same issue. Meanwhile, the DIAM Debugger appears to render that same sentence just fine:

ksnip_20220528-180312

Still, it would be nice to be able to just drop my TTF file to the project and apply the font to all source text.

vintagentleman avatar May 28 '22 15:05 vintagentleman

I have just tried this Chrome Plugin here: https://chrome.google.com/webstore/detail/force-custom-fonts/hckjchjpkmbihoocajjpjajkggbccgee?hl=en

Screenshot 2022-05-28 at 17 15 04 Screenshot 2022-05-28 at 17 15 24

Maybe that could help you across until we have a better solution?

reckart avatar May 28 '22 15:05 reckart

That does the trick, client-side at least. Thank you!

vintagentleman avatar May 28 '22 15:05 vintagentleman

I would recommend the Stylus addon for this purpose: https://github.com/openstyles/stylus. It's free, open source software that respects user privacy, and it's available for both Chrome and Firefox.

One feature that looks particularly interesting is the ability to export defined styles: So an admin can define the required font substitutions, export these to JSON, and all the users would need to do is install the addon and import the exported JSON file. I've found that the following snippet works well for Inception:

.brat text {
    font-family: "Junicode" !important;
}

ghost avatar Jun 16 '22 09:06 ghost