Open himorin opened 4 years ago
@vlevantovsky any thoughts on this issue?
Thank you @nigelmegitt, I saw this comment but I am not sure I am fully equipped to offer a solution. In general, I do not like using PUA as a crotch for inserting presentation forms inside text strings, but I do understand their concern here.
Ideally, when you have a font that supports all standardized forms of glyph encoding (outlines, SVG glyphs, bitmaps) - the use of glyph substitution rules to swap one glyph (or a sequence of glyphs) for another would work fine and would be my preferred solution. However, I do understand the concerns related to invoking different rendering environments, e.g. a GSUB substitution that replaces a vector outline glyph with SVG glyph would work perfectly fine if both rendering environments are supported, but this is not always the case.
In general, I think that using PUA for encoding standalone glyph images that are not part of the text string proper (e.g. a standalone image/graphics encoded inline as a character in the end of a sentence or in between words) would be a less-objectionable use of PUA area of Unicode. However, when it comes to using PUA as a crotch to fix the implementation deficiencies (e.g. to avoid complexity associated with chaining contextual substitutions such as GSUB + IVS), I don't think it's a good idea! It will inevitably introduce a wave of incompatibilities between different tools, e.g. those that are used to produce TTML content where implementations are standards compliant. In essence, we would require those tools to adopt special purpose PUA code use instead of using standard Unicode encoding and font-supported glyph substitutions, which would introduce language dependencies (Is it for Japanese only? Is it only for Japanese only when vertical writing is used? Should we only use it for glyph variants / Ruby forms?) and many other problems that are hard to even predict.
The Timed Text Working Group just discussed [WR/ARIB] Mixture of text and image w3c/imsc#543
, and agreed to the following:
SUMMARY: TTWG to request ARIB for examples, and consider adding a substitution example to IMSC or TTML.
Per: https://github.com/w3c/ttwg/issues/116 Comment 1
ARIB Data WG understands that the draft text of IMSC-1.2 employs Glyph Substitution (GSUB) of OpenType font to add the capability to handle some images in text-only mode. ARIB Data WG thinks that GSUB is originally intended to provide different representation of glyphs (variation) when needed, such as in case of vertical writing or combined forms. ARIB Data WG is afraid that use of GSUB to embed inline graphics in text-only mode may require complicated operation. It may require some additional rules for practical use such as use or not use of Private Use Area (PUA) for a code point of inline graphics. ARIB Data WG would like to point out that vertical writing and Ideographic Variation Selector (IVS) are already in use in ARIB STD-B62 compliant environment. As described in clause 3.2 below, ARIB STD-B62 supports Web Open Font Format (WOFF) thus ARIB STD-B62 compliant environment potentially supports GSUB. ARIB Data WG also understands that use of GUSB assumes the delivery of additional font file(s) with a TTML document. Then it is considered that difference between use of GSUB and simple Gaiji scheme is only manipulation of those glyph images in a TTML processor. Contextual substitution in GSUB is a complicated method, if a target string contains IVS in particular. ARIB Data WG thinks that use of additional fonts with PUA assigned code like Gaiji should be considered as a simpler alternative method for inline graphics. And ARIB Data WG also would like to point out that clear description on use of GSUB for inline graphics in the text of IMSC Recommendation will be helpful for the readers to understand how inline graphics is handled in IMSC-1.2.