notofonts / latin-greek-cyrillic

Noto Latin, Greek, Cyrillic
SIL Open Font License 1.1
39 stars 8 forks source link

Implement slashed zero variant #299

Closed mina86 closed 4 years ago

mina86 commented 8 years ago

Implement a slashed zero variant of the zero digit (U+0030) which can be enabled via the zero Open Type feature. In CSS that can be turned on with font-variant-numeric: slashed-zero;.

marekjez86 commented 8 years ago

from https://en.wikipedia.org/wiki/Slashed_zero : ' ... Unicode supports explicit slashed zero, but only via a pair of combining characters, not as a distinct single character (or codepoint, in Unicode parlance). It is treated literally as "a zero that is slashed", and it is coded as two characters: the commonplace zero and then the "combining long solidus overlay" (U+0338). These combining characters overlay the preceding character, creating a composite glyph. ... '

moyogo commented 8 years ago

In Unicode 9.0 a standardized variation sequence was added for zero with short diagonal stroke form. See StandardizedVariants.txt or chapter 22. But the zero feature would still be useful since that’s linked to the font-variant-numeric CSS property slashed-zero value.

mina86 commented 8 years ago

Note that using combining solidus or variant selector is in many cases impractical and harmful since code fragment stop being copy’n’pasteable.

verdy-p commented 8 years ago

This variant of zero was typically used by programmers on low resolution devices where it was no possible to distinguish the digit zero from the capital letter O.

However I disagree that this was a long slash overlay (passing through to ouside the oval), traditionally it was just a small inner overlay, not always touching the inner ring, and frequently only just a dot in the middle.

The version with a long solidus would be confusive.

Anyway Noto cannot stilldisplay any difference between zero and capital O: the problem is related: people do want a distinction: if you cannot change the shape or metrics of zero to be more oval, people will want to enable the small slash overlay by activating the opentype feature, but WITHOUT reencoding their document.

There are similar comon features for digits, such as a barred version of the seven digit, or digits hanging down below the baseline in traditional typography (usually not in sans-serif styles, but in serif styles), and variants for the digit four :

When you look at how people manually draw digits on paper (or when decorating cakes...), there's a clear difference between what is seen in US (more rarely in British Isles) and what is seen in Europe (notably in Romance countries) or in Arabic countries (when they use the Latin script and European digits).

OpenType defines several features to enable these variants by default. But they may be specifically selectable on each occurence using variant selectors (if they were encoded in Unicode), independantly of the feature setting. This should be the case for the slashed or non-slashed zero (without the variant selector, the glyph should adopt the feature preference, or a default preference according to the language selected by the "locl" feature)

brawer commented 8 years ago

@marekjez86, can we ask our vendor to draw a slashed zero glyph, to add a cmap format 14 table that uses it for VS1 (so that the sequence 0030 FE00 uses the slashed variant), and also to add zero feature to the GSUB table? While at it, the vendor could also implement the other standardized variants prescribed by Unicode.

cmap format 14 is actually a bit ill-supported in current feature file formats. For Adobe feature files, I’ve filed https://github.com/adobe-type-tools/afdko/issues/151 to get it added. For Monotype feature files, it’s not clear whether the format supports it because their cmap files seem entirely undocumented; filed https://github.com/Monotype/OpenType_Table_Source/issues/10 to get this fixed.

mina86 commented 8 years ago

However I disagree that this was a long slash overlay (passing through to outside the oval), traditionally it was just a small inner overlay, not always touching the inner ring, and frequently only just a dot in the middle.

Yeah, that would be U+0030 U+FE00 vs. U+2205 U+FE00. Having both would be best but I would be satisfied with either really.

dougfelt commented 8 years ago

Is this desired for LGC, Monospace, or both?

brawer commented 8 years ago

Personally I’d say all of them.

dougfelt commented 8 years ago

My thought for mono was that the default glyph would be a slashed or dotted zero, but then it seems there'd be no means to get a standard zero. Or would there be?

dougfelt commented 8 years ago

The wikipedia article Marek referenced also says "Use of the "combining short solidus overlay" (U+0337) produces a result where the slash is contained within the zero. This may be coded as 0̷ to yield 0̷." This is specifically the short solidus, not the long one mentioned in the excerpt Marek provided.

It's clear the gsub zero feature is required. Beyond this, I'm not sure if the variation sequence is the only sequence we need to support, or if one or the other of the combining solidus sequences should also be supported.

mina86 commented 8 years ago

Is this desired for LGC, Monospace, or both?

I’ll echo brawer’s opinion. To give you concrete example, I use proportional font for code samples on my website and I need slashed zero there.

My thought for mono was that the default glyph would be a slashed or dotted zero, but then it seems there'd be no means to get a standard zero. Or would there be?

My understanding is that the zero feature can be enabled, disabled or not specified. I might be wrong.

dougfelt commented 8 years ago

@waksmonskiMT, please ensure that fonts with ASCII zero support a slashed variant via the gsub 'zero' feature as well as via the variation sequence.

verdy-p commented 8 years ago

My opinion is that even if pairs with diacritics are acceptable, there's a need to control the appearance of the variant for zero, for default renderings without changing the encoded text (I can imagine easily contexts in which, for example, a data editor would enable this feature for editing data files as they are and where there's a clear need to make a visual distinction)

If the standard zero can have several looks I think that the feature should be controlable. And we should also request to Unicode the encoding of variant pairs for: ZERO+VS1 : ZERO with no visual diacritic (just the ring): fonts should still allow some distinction with a plain letter O VERO+VS2 : ZERO with a dot in the middle: fonts should still allow some distinction with a plain letter O and a middle dot VERO+VS2 : ZERO with a short solidus in the middle: fonts should still allow some distinction with a plain letter slashed O letter (e.g. in Nordic languages)

I'm sure we dont need any variant for the long solidus overlay.

ZERO alone may adopt any one of these three variants in any font.

Fonts implementing the zero feature may be selected by looking if they map one of the pair with these variant selectors. However for the Noto font itself, it will have to choose one: I think its default should still use the absence of any diacritic by default, and that the default for the zero feature would be to use the dotted variant. But it may still map the three variant pairs.

There's also a wellknown variants for digits using vaying height and descenders: it such version, the zero looks more like a small letter o (i.e. not extending above the x-height) but still distinguished from the plain letter o (which is generally a vertical oval or a rounded square, so the zero would be more like a circle or horizontal oval). Positining the overlays in it is easy for the dot, but for the small solidus it may be more difficult to make it very readable. However this traditional typographic feature will not be for the sans-serif style, and more likely for the serif style. In the sans serif font, all digits should have equal advance width (the "figure width", same as the width for the figure space, so they line up vertically in number data columns) and equal height (M-height).

Is there a proposal to add variants in Unicode for ZERO (and possibly as well for SEVEN and FOUR), with the exclusion of the typographical variants with variable heights (fillting well only in traditional serif fonts but not for use in columns) if one really wants to create text documents with a predictable prefered variant (using VS-sequences) without depending on user preferences (features) or capability of renderers to select the feature directly in styles embedded in rich-text document or in stylesheets ?

2016-10-10 18:04 GMT+02:00 dougfelt notifications@github.com:

My thought for mono was that the default glyph would be a slashed or dotted zero, but then it seems there'd be no means to get a standard zero. Or would there be?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googlei18n/noto-fonts/issues/733#issuecomment-252665578, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUqG3PQDIE-ebnNS8D09olh07PFgkysks5qymIGgaJpZM4Joyt0 .

dougfelt commented 8 years ago

I don't know of such a proposal. I imagine you'd need to show precedent for a semantic distinction between these variants within the same text.

The 'zero' feature tag seems designed only to enable a slashed zero form, not to turn it off or select alternate forms in general.

verdy-p commented 8 years ago

I've seen many maths documents distinguishing various forms of zeroes (and other digits). The dot is likely to be one of these distinguised variants, and the slash is generally not used to to its confusion with the empty set or some capital theta. Diacritics (including overlaid ones) are frequently used (as welll as doublestruck, or bold styles).

2016-10-10 22:26 GMT+02:00 dougfelt notifications@github.com:

I don't know of such a proposal. I imagine you'd need to show precedent for a semantic distinction between these variants within the same text.

The 'zero' feature tag seems designed only to enable a slashed zero form, not to turn it off or select alternate forms in general.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googlei18n/noto-fonts/issues/733#issuecomment-252736432, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUqGxYehW26Q6VuxOjW43Rp-kFDTd38ks5qyp9egaJpZM4Joyt0 .

brawer commented 8 years ago

@verdy-p, you’re of course welcome to make a proposal with Unicode. See Submitting Character Proposals. Also, it’s definitely worth looking at UTC Historical Documents to see how such proposals typically look like. The process sounds a little daunting, but if you can eg. include images of mathematical documents making a semantic distinction between different shapes for the same digit, you might be able to make a convincing argument for inclusion into the Unicode standard. From the font side, we can only implement variation sequences after they were standardized by Unicode; otherwise, we’d be hurting interoperability.

marekjez86 commented 7 years ago

MTI comment: "Added zero OpenType feature "

marekjez86 commented 7 years ago

All Noto LGC fonts support 0030 FE00 as 'slash zero'. @mina86 : what else needs to be verified?

marekjez86 commented 7 years ago

sample

<html lang="en">
<p><span style="font-size:48.0px">0︀ [0030 FE00]</span></p>
</html>

en-733slashzero-NotoSans-Black.pdf en-733slashzero-NotoSans-Italic.pdf en-733slashzero-NotoSans-Regular.pdf en-733slashzero-NotoSansDisplay-Black.pdf en-733slashzero-NotoSansDisplay-Italic.pdf en-733slashzero-NotoSansDisplay-Regular.pdf en-733slashzero-NotoSansMono-Black.pdf en-733slashzero-NotoSansMono-Regular.pdf en-733slashzero-NotoSerif-Black.pdf en-733slashzero-NotoSerif-Italic.pdf en-733slashzero-NotoSerif-Regular.pdf en-733slashzero-NotoSerifDisplay-Black.pdf en-733slashzero-NotoSerifDisplay-Italic.pdf en-733slashzero-NotoSerifDisplay-Regular.pdf en-733slashzero-Roboto-Black.pdf en-733slashzero-Roboto-Italic.pdf en-733slashzero-Roboto-Regular.pdf

mina86 commented 7 years ago

The zero Open Type feature:

<!DOCTYPE><html>
<p style="font-variant-numeric: slashed-zero">0
marekjez86 commented 7 years ago

sample

<html lang="en">
<p style="font-variant-numeric: slashed-zero">0</p>
</html>

Every other LGC font (from https://github.com/googlei18n/noto-fonts/tree/master/alpha/from-pipeline/unhinted ), but NotoSans Italic does not and none of the Roboto's ( @jamesgk @roozbehp ) support the zero Open Type feature

en-733-slashed-zero-NotoSans-Black.pdf en-733-slashed-zero-NotoSans-Italic.pdf en-733-slashed-zero-NotoSans-Regular.pdf en-733-slashed-zero-NotoSansDisplay-Black.pdf en-733-slashed-zero-NotoSansDisplay-Italic.pdf en-733-slashed-zero-NotoSansDisplay-Regular.pdf en-733-slashed-zero-NotoSansMono-Black.pdf en-733-slashed-zero-NotoSansMono-Regular.pdf en-733-slashed-zero-NotoSerif-Black.pdf en-733-slashed-zero-NotoSerif-Italic.pdf en-733-slashed-zero-NotoSerif-Regular.pdf en-733-slashed-zero-NotoSerifDisplay-Black.pdf en-733-slashed-zero-NotoSerifDisplay-Italic.pdf en-733-slashed-zero-NotoSerifDisplay-Regular.pdf en-733-slashed-zero-Roboto-Black.pdf en-733-slashed-zero-Roboto-Italic.pdf en-733-slashed-zero-Roboto-Regular.pdf

jamesgk commented 7 years ago

Roboto issue at https://github.com/google/roboto/issues/134

nizarsq commented 4 years ago

MTI comment: "Added zero OpenType feature "

U+0030 (0) works well with font-variant-numeric: slashed-zero. Tested using NotoSans, NotoSerif and NotoSansMono

Screen Shot 2020-07-21 at 10 32 37 PM
mailinglists35 commented 3 years ago

where can I download a TTF with slashed zero of font noto mono?

marekjez86 commented 3 years ago

Please try https://github.com/googlefonts/noto-fonts/tree/main/hinted/ttf/NotoSansMono

On Tue, May 18, 2021 at 12:03 PM mailinglists35 @.***> wrote:

where can I download a TTF with slashed zero of font noto mono?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/googlefonts/noto-fonts/issues/733#issuecomment-843456313, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFUS755P7KP74EK6D25IUDTOK2ZNANCNFSM4CNDFN2A .

Lonli-Lokli commented 2 years ago

Why its not working for fonts here, are they outdated?

https://fonts.google.com/noto/specimen/Noto+Sans?selected=Material+Icons&query=noto

simoncozens commented 2 years ago

They are outdated. I’ve requested an updated version of the fonts be pushed to the Google Fonts API. That’s been agreed and it’s going through the pipeline. (The new fonts have to first go to a staging server and then into production.) Give it another week or so?

Lonli-Lokli commented 2 years ago

@simoncozens thanks! Is it possible to see somewhere published version?