844 Commits

Author SHA1 Message Date
Ben Harris
2cb837fe6f Clarify 3.251 release notes
Better late than never.
2025-02-03 00:32:37 +00:00
Ben Harris
da2e1af9d4 Update version to 3.251 bedstead-3.251 2025-02-02 17:00:00 +00:00
Ben Harris
9b8a3dc4fd Rename "angular" cedilla as "square"
They both have angles, after all.  Also "square" sorts more
conveniently in the 'aalt' lookup.
2025-02-02 11:29:58 +00:00
Ben Harris
c6fac43ec3 Rough sketch of 3.251 release notes 2025-02-01 16:13:53 +00:00
Ben Harris
cf2fb8b610 Add private-use code points for new unmapped glyphs
Also turn seriffed Dcroats into aliases for the corresponding Eths to
slightly reduce the number of nominally distinct glyphs.
2025-02-01 10:43:49 +00:00
Ben Harris
4db92cb508 Add E with cedilla
That's a real cedilla, and hence gets the SAA5054 angular form.  It's
also the last Latin letter with a cedilla that isn't blocked by
something else.  At least, until Unicode adds a new one.
2025-01-30 21:18:45 +00:00
Ben Harris
0d8f1b4c6f Glyphs for G, K, L, N, and R with comma below
These are the remaining characters that Unicode calls "WITH CEDILLA" but
that the standard (and code charts) say should actually have a comma
below by default.
2025-01-30 21:07:41 +00:00
Ben Harris
ce2dc007ec Redesign Hcedilla and hcedilla
The Unicode code charts and all the fonts I have conveniently to hand
are agreed that the cedilla should be attached to the letter, usually
to the left leg.  So now it is in Bedstead as well.  This also allows
the body of the letter to return to its normal shape.
2025-01-30 20:34:52 +00:00
Ben Harris
1f2248de9a Add S with comma below
As with T, this is distinct from the cedilla version, but it's
visually identical in Bedstead except when you turn on 'cv96'.
2025-01-30 14:15:44 +00:00
Ben Harris
926cedd4bc Add T with comma below
If I'm going to insist that U+0162 and U+0163 really have cedillas, I
should have their unambiguously comma-below versions, U+021A and
U+021B, as well.
2025-01-30 14:11:02 +00:00
Ben Harris
6326c4362d Convert cedillas under D to commas
According to Unicode 16.0.0 (chapter 7), U+0327 COMBINING CEDILLA is
ambiguous.  It can mean an actual cedilla, but it can also mean a
comma below.  This also applies to precomposed characters containing
it.  Unicode recommends default forms for various letters and in
particular says that for D and T (upper- and lower-case) the comma
form should be the default.

However, Unicode now has a separate U+021A LATIN CAPITAL LETTER T WITH
COMMA BELOW and recommends its use for Romanian.  So I think the
recommendation to render U+0162 LATIN CAPITAL LETTER T WITH CEDILLA with
a comma below is no longer applicable.

I have now updated Bedstead so that U+1E10 LATIN CAPITAL LETTER D WITH
CEDILLA is treated as having a comma below instead.  In practice, this
just means that it's unaffected by 'cv96'

All references to capital letters above apply equally to the
corresponding small letters.
2025-01-30 14:02:11 +00:00
Ben Harris
2cee520a53 Sort elements of the FeatureIndices array by feature tag
The OpenType spec (version 1.9.1) says, "The FeatureRecord array
should be sorted alphabetically by feature tag."  Bedstead was instead
emitting them in the order in which they appeared in the gsub_features
array, which was determined by the order the lookups need to occur in.
In particular, the 'cvXX' lookups need to occur after the 'ssXX'
lookups so as to override them properly.

Fixing this required some care to keep all the indices straight, but I
think I've managed it.
2025-01-29 22:10:40 +00:00
Ben Harris
37dafb753a Add comments with feature tags for FeatureIndices 2025-01-29 21:40:32 +00:00
Ben Harris
689b4a76f4 Use a conventional lenof() macro for lengths of static arrays
It's slightly unconventional in that it casts the result to int, which
is fine for all our arrays and avoids warnings when we use it.
2025-01-29 13:57:28 +00:00
Ben Harris
72fb39b706 Add parameter labels for 'cvXX' features
This means that now each possible variant of a character covered by a
'cvXX' feature has a human-readable name.  I don't know of anything
that uses these, so they're somewhat untested.
2025-01-28 23:06:05 +00:00
Ben Harris
2e0b22b86f Small-cap and narrow forms of U+A780 (turned L) 2025-01-27 22:53:55 +00:00
Ben Harris
743dd15e67 Add white (outline) versions of card suits
The club and spade are one pixel taller than the black (filled) ones
because I couldn't come up with a convicing club in the smaller size.
2025-01-27 14:08:29 +00:00
Ben Harris
cd1ee0735b Redesign glottal-stop characters
Bedstead's various glottal-stop characters were originally based on
its question mark, because that character looks a bit like a question
mark without a dot.  However, while adding a Character Variant feature
for question marks I noticed that the glottal stop and question mark
in the Unicode code charts didn't match, which was why I left the
glottal stop out of that feature.

I've now also looked at the official IPA charts from the International
Phonetic Association, and it's clear that the glottal stop does not in
general match the question mark.  In particular, the join between the
rounded section and the stem is often smooth in a question mark but is
always a right angle in the glottal stop.  I've thus re-designed
Bedstead's glyphs to follow this pattern.  I've also shortened the
crossbar on the glottal stop derivatives that have them, since that
seems to better match DejaVu Sans, which is the sans-serif font
preferred by the IPA.
2025-01-19 00:49:30 +00:00
Ben Harris
87a044e871 Add U+23E8 DECIMAL EXPONENT SYMBOL
That seemed to be the only character needed by ALGOL 60 that I was
lacking.
2025-01-19 00:49:30 +00:00
Ben Harris
39474c8fc0 Add 'ss05' which maps all of U+0020..U+007E to SAA5055 glyphs
This seems appropriate for something that wants to treat these as ASCII
glyphs with their ambiguous semantics.

This uses the existing apostrophe.curly, and also adds grave.curly (an
alias for quotereversed) and bar.broken (an alias for brokenbar).  Of
course there are also 'cvXX' features to enable each one individually as
well.
2025-01-19 00:49:30 +00:00
Ben Harris
b5afc323ea Switch to a variadic macro for generating alternate substitutions 2025-01-19 00:49:30 +00:00
Ben Harris
9f2acba7bd Add character variant for curly apostrophe (SAA5051/2)
Unicode takes the position that U+0027 APOSTROPHE is always a straight
apostrophe and is you want a curly one you should use U+2019 RIGHT
SINGLE QUOTATION MARK (or U+02BC MODIFIER LETTER APOSTROPHE but let's
not get into that here).  Bedstead generally follows that, putting the
SAA5050 straight apostrophe at U+0027 and the SAA5055 curly one at
U+2019.

Older character standards, though, conflated those two and treated the
difference between them as one of font design.  In particular, ETS 300
706: May 1997, "Enhanced Teletext specification" treats position 2/7 as
being the same character in all national sub-sets of the Latin G0
primary set.  When coverting Teletext data to Unicode, ZVBI maps 2/7 to
U+0027 whichever national sub-set is in use.

This means that to faithfully display Teletext data in the way that an
SAA5051/2 would, Bedstead needs to interpret U+0027 as a curly
apostrophe.  I have accomplished this by adding a new "apostrophe.curly"
alias and including that in the 'ss01' and 'ss02' Stylistic Sets.  It
also, of course, gains a new Character Variant feature, 'cv07', so that
you can turn the curly apostrophe on and off independently.

This does cause me to wonder whether there should be a stylistic set to
map U+0020..U+007E onto the SAA5055 glyphs.
2025-01-19 00:49:30 +00:00
Ben Harris
c7ababa801 Rename parameters for CVXX macros to "V"
That makes things a little less verbose (for now).
2025-01-19 00:49:30 +00:00
Ben Harris
2e23f8f9c3 Fill in 'cv38' with far too many kinds of capital 'D' 2025-01-19 00:49:30 +00:00
Ben Harris
68e7796245 Add narrow small-cap J to 'cv42'
All the other J-based characters are either narrow already or
unsuitable for narrowing.
2025-01-19 00:49:30 +00:00
Ben Harris
11102ac014 Fill out 'cv44' with narrow capital Ls 2025-01-19 00:49:30 +00:00
Ben Harris
15ff246ea8 Fill out 'cv96' with all the angular cedillas
This collides with the small lower-case 't' of 'cv84' at U+0163 LATIN
SMALL LETTER T WITH CEDILLA, but I think all the combinations work.  I
do currently have both "uni0163.small.angular" and
"uni0163.angular.small" to ensure that you can apply each stylistic
set with the opposing character variant.  Maybe with more careful
interleaving I could get away with only one of those.
2025-01-19 00:49:30 +00:00
Ben Harris
27ba336388 Stop trying to indent XML output
The indentation wasn't always correct, and made the C code ugly.  I've
now found "xmllint --format", which does a better job, so I think it's
quite reasonable to stop trying to do it myself.
2025-01-19 00:49:30 +00:00
Ben Harris
0960e56e0e Expand some comments
Now that we use strings for bitmaps, the comments can be a little less
abbreviated.
2025-01-19 00:49:30 +00:00
Ben Harris
aeb66f043d More large, accented lower-case 'o's for 'cv79'
I thought about just re-using the ".sc" glyph names, but that seemed
wrong.
2025-01-19 00:49:30 +00:00
Ben Harris
da26a18aa0 Extend 'cv74' to other characters based on lower-case 'j'
I didn't do U+0254 LATIN SMALL LETTER DOTLESS J WITH STROKE because the
Unicode standard says it's based on a turned 'f', not 'j'.
2025-01-19 00:49:30 +00:00
Ben Harris
34e4cf780e Extend 'cv84' to most characters based on lower-case 't'
That's 12 additional glyphs, and I thought 't' would be one of the
simpler ones.  Still, it automatically works with 'ss01' and 'ss02' as
well.
2025-01-19 00:49:22 +00:00
Ben Harris
a993909e6f Merge SUFFIXSUB and SUFFIXSUB1 macros 2025-01-15 13:55:06 +00:00
Ben Harris
457163004e Use X-macro trick for emitting lookups for variant capital D
This will mean that adding extra characters to 'cv38' will
automatically add them to 'ss01' and 'ss02' as well.
2025-01-15 13:53:13 +00:00
Ben Harris
e1e56eab43 Remove the global "variable" (macro) from 'cvXX'/'ssXX' generation
I realised that VAR2 can be a parameter to the various CVXX macros
instead.  This makes the existing code a little more complicated, but
will make the code for the three-way choice of capital D less
confusing.

The macro names are getting worse, and will definitely need to be
rationalised at some point, bit the structure is getting better.
2025-01-15 11:18:02 +00:00
Ben Harris
832b518a8d Use a macro to emit <SingleSubst> elements 2025-01-14 23:35:18 +00:00
Ben Harris
b0f67aa3ef Don't emit multiple subtables for 'cv31'
I was accidentally emitting a separate <AlternateSubst> element for
each base character, which worked but was unnecessary.  A single
<AlternateSubst> for the whole lookup will make for a smaller font
file and probably faster lookups as well.
2025-01-14 23:29:48 +00:00
Ben Harris
c36cea4b1e Add some extra variant question-mark glyphs
The inverted and reversed question-mark characters should obviously
change shape along with the normal one, so now they do.  This
conveniently tests the 'cvXX'/'ssXX' interaction without getting
tangled up with small caps as well.

Based on the different shapes of the glyphs in the Unicode code charts,
I've decided that glottal stops should not change their shapes along
with question marks, and should perhaps be different shapes entirely.
2025-01-14 23:21:24 +00:00
Ben Harris
67721b71bc Construct 'ssXX' and 'cvXX' lookups using X macros
In general, we want each Stylistic Set to be constructed out of a
collection of Character Variants.  At the moment, this is fairly
simple, but if I start putting variants of more characters into these
features (for example, adding questiondown.open to go with
question.open), it will get awkward keeping them in sync.  But the two
kinds of lookup want different XML, so they can't just be copied
as-is.

One approach would be to have a C data structure that gets used to
generate both sets of lookups, but an alternative is to extend the
existing pre-processor magic to use X macros to construct the two
lookups.  This is what I've done.

At the moment, this is just using the existing macros that generate
XML, but driving them from another set of macros, one for each
Character Variant feature.  The Stylistic Sets then invoke all the
macros for the Character Variants they include.

There are a couple of open problems.  One is the (single, so far) case
where there are two variants of a character, namely 'D'.  This should
be dealt with by paramaterising the variant macro, but I've not got
around to that yet.  The other is that the macro names are largely
horrible.
2025-01-14 23:21:24 +00:00
Ben Harris
237d5f515d Rename two 'cvXX' features based on SAA5054 shapes
The features that generate the variant ocircumflex and ccedilla glyphs
are now treated a being variants of lower-case 'o' and cedilla
respectively.  Unlike the SAA5051/2 variants, we don't yet have
variants of their base glyphs.  Indeed, for the lower-case 'o' we
probably never will, because the variant is "larger accented versions"
so the unaccented version wouldn't change.

I haven't done anything about the weird SAA5054 ugrave because I'm not
sure there's any real design principle behind it.

I've also added a comment explaining the numbering of 'cvXX' features.
2025-01-14 23:21:24 +00:00
Ben Harris
fd06786a45 Add SPDX-License-Identifier to CSS files 2025-01-08 23:35:43 +00:00
Ben Harris
2b1938ed32 Add @character-variant rules to bedstead-faces.css 2025-01-08 23:34:30 +00:00
Ben Harris
669db1f283 Add names for 'cvXX' features 2025-01-08 22:42:31 +00:00
Ben Harris
320de601bc Add cvXX (character variant) lookups
The idea of these is that each one allows for choosing between different
variants of a single character (or set of closely-related characters).
This allows for deciding that you want (for instance) the angular
SAA5054 "ccedilla", but not its weird conjoined "ugrave".

This seems like a good way to handle chips like the SN74S262 where some
samples seem to vary in a single character from others, as well as more
generally for making the variant glyphs easily accessible for purposes
other than precise emulation.

At the moment, each feature only provides alternatives for a single
character, but now that we have a mechanism for it, that might change.
2025-01-08 21:15:53 +00:00
Ben Harris
8a2449c697 Don't emit <LookupType> elements
TTX is quite capable of inferring the lookup type from the type of the
main child element of <Lookup>.  This should allow for specifying
different kinds of lookup using literal XML.
2025-01-08 01:58:21 +00:00
Ben Harris
7658a55c86 Generate ss0X substitutions less cleverly
These substitutions are not generated from the glyphs table, but are
specified statically.  Rather than taking a table and transforming it
into XML with C, we could just put the static XML in a string, which
is much simpler.  To avoid excessive simplicity, the string is
generated by a pile of preprocessor macros.

This causes no change to the output OTFs.
2025-01-08 01:52:55 +00:00
Ben Harris
e6f3f6e1c9 Note source of ugrave.roundjoined in a comment 2025-01-05 10:24:53 +00:00
Ben Harris
1be864fb48 Don't emit AlternateSets that will be overridden
Just in case TTX changes its behaviour in this area in the future.
2025-01-02 00:53:02 +00:00
Ben Harris
ad5c574321 Add a comment explaining the purpose of aalt_overrides 2025-01-02 00:27:50 +00:00
Ben Harris
4e7b163a32 Signal names for SN74S262 pins, from RML 380Z service manual 2025-01-01 23:54:11 +00:00