Bedstead claims to be written in ISO C. ISO C allows "int" to be only
16 bits wide, which is a bit of a problem. In fact, it's not much of
a problem because Bedstead mostly deals in small numbers. The main
exception is Unicode code points, which can exceed 16 bits.
To hopefully fix this, Bedstead now mostly uses "long" for Unicode
code points. The main exception is in the gklph table where that
seems a bit profligate on 64-bit systems so I've used int_least32_t
instead.
The fiddliest bits of this are around uses of printf(), which cares
whether it's being passed an "int" or a "long".
This is untested on an actual 16-bit system, but at least on a 64-bit
system it continues to produce correct results.
Specifically this changes the comments on IPA characters to refer to
them in lower-case even though the official names of these characters
are upper-case. I did this because it was annoying not being able to
tell the case of a letter from its comment.
In addition to their obviously distinctive national characters, the
SAA5051 and SAA5052 also change the shape of some standard characters
compared to the SAA5050. I had spotted some of these, but noticed
several more when using an actual SAA5051 in my Acorn System 3. The
unusual characters are apparently much easier to spot on screen than
in a datasheet.
Now, I think, we actually have the correct characters for each of
these chips. In many cases, they're the same as one another, and in
those cases I've aliased the glyphs.
The small-caps and 'rtlm' lookups now come before the stylistic sets.
This is appropriate because the former make changes to the semantics
of characters and so should take priority over mere stylistic changes.
'palt' comes last because it can only reasonably be applied to the
actual glyphs being rendered.
Almost no new glyphs, because the existing accented caps glyphs are
themselves small. I'm not quite sure which glyphs small caps need to
be visually distinct from, so for now I won't worry about that.
I liked the approach I took with 'rtlm' of putting variant glyphs next
to the standard ones in the glyph array. So I've tried doing the same
with small caps. Each small cap appears at least twice. For ones with
real Unicode code points, the 'c2sc' version is an alias for the native
one. For small caps without Unicode code points, the 'c2sc' version is
the actual small cap glyph. In either case, the 'smcp' version is an
alias for the 'c2sc' one. This is a change from the previous setup,
where the 'c2sc' version was an alias for the 'smcp' one instead. I've
swapped them because the small cap glyph is generally based on the full
cap, so putting them together seems sensible.
As far as I can tell, the "GaspTable" line that I put in the SFD file
has never actually worked. I don't think I want it to anyway: even
when the source pixels line up precisely with the display pixels, it's
still worth having anti-aliasing on the diagonal lines. And of course
none of this would work properly for any width other than the default
one.
So overall, it doesn't work, and if it did I'd want it to stop. So
let's remove it.
These are characters that have the Bidi_Mirroring_Glyph but don't
appear in the OpenType Mirroring Pairs List (OMPL). In a couple of
cases, these are listed by Unicode as "best fit" and I think I should
actually redraw the tildes the other way around.
This implements the Bidi_Mirrored Unicode property for those characters
that don't have a Bidi_Mirroring_Glyph. These are the characters listed
at the end of BidiMirroring-15.1.0.txt. I haven't yet assigned them PUA
code-points. The characters with a Bidi_Mirroring_Glyph that don't
appear in the OpenType Mirroring Pairs List (OMPL) still need aliases
added.
The TeX "unicode-math" package conveniently lists a bunch of characters
that it treats as the kind of large operator that takes limits. Bedstead
has a standard treatment for these, stretching them over the full height
of the character cell. So I've drawn some that are in Plain TeX or
otherwise reasonably easy. One exception is the n-ary square cap and
cup operators because I can't work out how to distinguish them from the
n-ary product and coproduct.
This is usually five-pointed, and I seem to have come up with an
acceptable five-pointed design. This matches the existing U+235F APL
FUNCTIONAL SYMBOL CIRCLE STAR. U+2363 APL FUNCTIONAL SYMBOL STAR
DIAERESIS is modified to match.
It looks like these will have an official mapping in the next version of
Unicode, so I'll leave out the PUA mapping and put in a proper mapping
once they're in Unicode proper.
This reverts commit dd35eed4ed411ca3468306f5a281118cef8a2f28.
The new Oslash is probably better than the old one, with a slash that
actually passes through the O. It's also distinguishable from the new
U+2298 CIRCLED DIVISION SLASH.
It was very hard to tell apart U+2295 CIRCLED PLUS and U+233E APL
FUNCTIONAL SYMBOL CIRCLE JOT. Making the circles the size of an
upper-case 'O' has helped with that. I've enlarged U+2296 CIRCLED
MINUS and U+2299 CIRCLED DOT OPERATOR to match. I've left U+25CB
WHITE CIRCLE alone because it probably wants to be distinct from
upper-case 'O' and it doesn't have anything in it.
Unicode 15.0 says that U+2329 LEFT-POINTING ANGLE BRACKET and U+232A
RIGHT-POINTING ANGLE BRACKET are deprecated because they're
canonically equivalent to CJK wide angle brackets. However in a
purely narrow font like Bedstead I think it's reasonable to provide
them and they have AGLFN-assigned names ("angleleft" and "angleright")
that people might still use. I've make them visually identical to the
more modern U+27E8 MATHEMATICAL LEFT ANGLE BRACKET and U+27E9
MATHEMATICAL RIGHT ANGLE BRACKET.
Table 22-5 in Unicode 15.0 lists a number of mathematical operators
that have been disunified from punctuation characters because in some
fonts they might look different or because they otherwise need
different handling. In some cases Bedstead only had a glyph for one
of the two characters. Now we have both in all cases. Here's what
happened in each case:
U+002D HYPHEN vs U+2122 MINUS SIGN: both already present and
different.
U+003F SOLIDUS vs U+2215 DIVISION SLASH: U+003F copied as U+2215.
U+005C REVERSE SOLIDUS vs U+2216 SET MINUS: U+005C copied as U+2216.
U+002A ASTERISK vs U+2217 ASTERISK OPERATOR: U+002A copied as U+2217.
U+25E6 WHITE BULLET vs U+2218 RING OPERATOR: new U+25E6 designed based
on U+2022 BULLET. It's identical to U+25AB WHITE SMALL SQUARE but I
think that's reasonable. Bullets represent a font's preference and
are likely to be identical to some geometric shape.
U+007C VERTICAL LINE vs U+2223 DIVIDES: both already present and
identical.
U+2016 DOUBLE VERTICAL LINE vs U+2225 PARALLEL TO: both already
present and identical.
U+003A COLON vs U+2236 RATIO: new U+2236 drawn one pixel higher than
U+003A.
U+007E TILDE vs U+223C TILDE OPERATOR: both already present and
different.
U+00B7 MIDDLE DOT vs U+22C5 DOT OPERATOR: U+00B7 copied as U+22C5.
Specifically halfwidth forms of characters where we already have
ambiguous versions. Bedstead is intrinsically a half-width font, so
the halfwidth forms should look the same as the ambiguous ones.