[MPEG-OTSPEC] Requesting progress update on COLRv1 in fontTools, FreeType, etc.

Peter Constable pgcon6 at msn.com
Fri Jan 22 21:02:55 CET 2021


William

It would be relatively quite easy for the creator of a font development tool to add UI for the font designer to specify colours for your “dec col 1”, etc. However, I thought the point was to have colours that can be controlled by the end user, not the font developer. Would this be just to set the values to a default (since you mention a default in your other message)?

Assigning colour values to FFFD and FFFE would be problematic. In the case of FFFF, no colour value is specified in the font at all, and that is a necessary assumption. The reason is that, if a value were specified in the font for FFFF, it would imply that there must be 65536 entries in every CPAL palette. That would be extremely wasteful. Because FFFF refers to a colour that is only specified _outside the font_, there is no need to have for FFFF to be a valid index into the color record array. The same would apply to FFFD and FFFE: If you want to give FFFD a special meaning but also allow the font creator to assign a default colour that gets recorded in the font, then it would have to be recorded in the 65534th color record. Either that, or else the formats would need to be changed to add special fields in the CPAL table that store only the “dec col 1” etc. values.

But this still doesn’t address the problems that exist for users. With FFFF, a content author specifies text foreground colour in their content. Every document format that supports rich (styled) text will include some means of storing the text foreground colour styling. If a content author needs to specify “dec col 1”, etc., then not only do font specs need to define that but now content formats also need to define a way for that author-determined information to be conveyed as part of the content; and applications for viewing the content would need to support that. For example, CSS would need a way to specify “dec col 1”, and browsers would need to read and apply it when displaying text with a colour font. IOW, you’d have to sell your idea to a lot of other groups than just those involved in defining OFF or OpenType.

For a spec like CSS that gets used in many contexts and implemented in many applications, selling that would be an uphill challenge. For an app that uses a proprietary content format, e.g., Affinity Designer (ignoring for the moment any export to other formats), because they own their proprietary format there isn’t a need for industry-wide agreement on interoperable formats. But then we’re into a scenario in which it would make just as much sense for the app to give the content author complete control over the colour palette used by a given font. The cost for them to create the UI and define ways in their document format to represent the choices are comparable.



Peter

From: mpeg-otspec <mpeg-otspec-bounces at lists.aau.at> On Behalf Of William_J_G Overington
Sent: Friday, January 22, 2021 9:36 AM
To: mpeg-otspec at lists.aau.at
Subject: Re: [MPEG-OTSPEC] Requesting progress update on COLRv1 in fontTools, FreeType, etc.


Earlier today I wrote as follows.

> On a different aspect of the specification, originally if one used FFFF as the colour index it allowed the colour actually used to be set by the end user as the foreground colour. Does the system now allow/ will you please consider allowing, similar 'tunnel through' colours, so that there would be a feature whereby an end user could also select in an application first decoration colour and second decoration colour so that, say, one could have, for example, a font with some glyphs of holly with berries and the end user could choose to have green leaves with red berries or gold leaves with silver berries or whatever colour combination desired, with the way that the specification is done such that there is a default colour? So, for example, displaying the glyphs in an application that does not have a decoration colour choosing facility, or it is switched off, the holly appears as green leaves with red berries yet the colours can be chosen by the end user in applications where a decoration colour choosing facility is available and switched on.



Thinking further on this, it would appear that there are (at least) three aspects to implementing this.



The first is the Specification.



The second is implementation in fontmaking software.



The third is implementation in application software such as a desktop publishing program.



I have done some scientific programming, though it was many years ago, and my speciality was in providing programming advice to undergraduate students so I was reasonably knowledgeable of programming for that purpose, but I was not really deeply into things like the advanced parts of C++. I have no experience in producing large commercial software packages such as fontmaking programs or desktop publishing programs. So, within those limitations, and not willing to say that something can be done if I cannot do it myself, here are my thoughts on the implementations, expressed as if questions which hopefully some participants here might answer please.



If my idea of decoration colours were implemented, with, say, decoration colour 1 as FFFE default colour green and decoration colour 2 as FFFD default colour red, would that be straightforward to implement in a fontmaking program please? I am thinking that the colour palette dialogue panel in a fontmaking program could have buttons for



dec col 1



and



dec col 2



and they would each show the respective default colour, and that could be customized by a font designer for a particular font.



Would such customization be straightforwardly programmable by the person producing the fontmaking software package? Is it much the same as customizing any other colour in the palette, the only difference being that the other colour palette members would have low numbers and these two colour palette members would have the fixed numbers as in the specification? So to the font, would they just be colours, it is just that an application program with decoration colour choosing capability available and switched on would recognise them?



In a desktop publishing program, would the software package programmer be able to add in the menus for the selection of decoration colours fairly straightforwardly by using copies of the software already used for selecting text foreground colour? How difficult would it be to recognise FFFE and FFFD colour codes in a font and substitute the end user selecting colours in the display?



A consideration is whether having FFFE and FFFD colours in a font that is used in a COLRv0 system setting would work satisfactorily. Could someone who understands how the specification works in detail possibly comment on this please?



William Overington



Friday 22 January 2021




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210122/7615bf73/attachment.html>


More information about the mpeg-otspec mailing list