chiark / gitweb /
bedstead.git
5 weeks agowebstead: set color:inherit on tickyboxes
Ben Harris [Sat, 4 Oct 2025 16:31:30 +0000 (17:31 +0100)]
webstead: set color:inherit on tickyboxes

Chromium's browser stylesheet overrides this.

5 weeks agowebstead: put border on tickboxes, not table cells
Ben Harris [Sat, 4 Oct 2025 16:27:21 +0000 (17:27 +0100)]
webstead: put border on tickboxes, not table cells

That means the borders are clickable, which is what I want.

5 weeks agowebstead: scale input and output better with window size
Ben Harris [Sat, 4 Oct 2025 16:16:51 +0000 (17:16 +0100)]
webstead: scale input and output better with window size

It turns out that setting --pix to 7vmin, while rather unprincipled,
does actually work quite adequately.

5 weeks agowebstead: use currentColor for checked background
Ben Harris [Thu, 25 Sep 2025 20:03:10 +0000 (21:03 +0100)]
webstead: use currentColor for checked background

This means that webstead.xhtml doesn't know anything about the colours
in bedstead.css.

5 weeks agowebstead: use <pre> for C code
Ben Harris [Sat, 20 Sep 2025 22:30:04 +0000 (23:30 +0100)]
webstead: use <pre> for C code

5 weeks agowebstead: generate initialisers to paste into bedstead.c
Ben Harris [Sat, 20 Sep 2025 20:44:19 +0000 (21:44 +0100)]
webstead: generate initialisers to paste into bedstead.c

5 weeks agowebstead: slight CSS simplification
Ben Harris [Sat, 20 Sep 2025 20:08:05 +0000 (21:08 +0100)]
webstead: slight CSS simplification

Don't need to specify border colour if it's the current colour anyway.

5 weeks agowebstead: better layout
Ben Harris [Sat, 20 Sep 2025 15:12:57 +0000 (16:12 +0100)]
webstead: better layout

5 weeks agowebstead: almost-acceptable pixel-looking input
Ben Harris [Tue, 16 Sep 2025 21:32:40 +0000 (22:32 +0100)]
webstead: almost-acceptable pixel-looking input

5 weeks agowebstead: slightly cleverer path translation
Ben Harris [Tue, 16 Sep 2025 21:12:25 +0000 (22:12 +0100)]
webstead: slightly cleverer path translation

Now paths with successive rlineto operations (to avoid overflowing the
Type 2 stack) work.

5 weeks agowebstead: SVG transform to turn output right way up
Ben Harris [Tue, 16 Sep 2025 20:14:47 +0000 (21:14 +0100)]
webstead: SVG transform to turn output right way up

5 weeks agowebstead: properly ignore cntrmask
Ben Harris [Tue, 16 Sep 2025 20:08:58 +0000 (21:08 +0100)]
webstead: properly ignore cntrmask

5 weeks agowebstead: input from an array of tickyboxes
Ben Harris [Tue, 16 Sep 2025 20:07:01 +0000 (21:07 +0100)]
webstead: input from an array of tickyboxes

5 weeks agowebstead: make a named function to update the rendered glyph
Ben Harris [Mon, 15 Sep 2025 22:36:48 +0000 (23:36 +0100)]
webstead: make a named function to update the rendered glyph

5 weeks agowebstead: SVG rendering by extremely crude regexps
Ben Harris [Sun, 14 Sep 2025 18:37:56 +0000 (19:37 +0100)]
webstead: SVG rendering by extremely crude regexps

5 weeks agowebstead: use standard bedstead.css
Ben Harris [Sun, 14 Sep 2025 18:36:35 +0000 (19:36 +0100)]
webstead: use standard bedstead.css

5 weeks agoCapture output in HTML
Ben Harris [Sat, 13 Sep 2025 22:12:58 +0000 (23:12 +0100)]
Capture output in HTML

5 weeks agoMinimal build system and test page for Bedstead-in-WASM
Ben Harris [Sat, 13 Sep 2025 21:12:08 +0000 (22:12 +0100)]
Minimal build system and test page for Bedstead-in-WASM

Just allows for typing a command line and seeing the output.

4 months agoUse text/plain for all-caps filenames in .htaccess
Ben Harris [Sat, 18 Oct 2025 23:07:51 +0000 (00:07 +0100)]
Use text/plain for all-caps filenames in .htaccess

There are various text files in the Bedstead sources (and hence on the
Web site) that have conventional names in all caps, like NEWS.  These
should be served as text/plain.  That can be achieved in Apache using
a <FilesMatch> block and ForceType.

4 months agoAdd more compressible types in .htaccess
Ben Harris [Sat, 18 Oct 2025 22:45:47 +0000 (23:45 +0100)]
Add more compressible types in .htaccess

It looks like by AddOutputFilterByType directive somehow overrides the
defaults, and also there are a few more types that could usefully be
compressd.  So now it lists all the compressible file types in the
directory.

4 months agoEnable "deflate" filter for XHTML and fonts in .htaccess
Ben Harris [Sat, 18 Oct 2025 16:31:40 +0000 (17:31 +0100)]
Enable "deflate" filter for XHTML and fonts in .htaccess

The configuration on chiark already compresses most HTML content
types, and OTF fonts (especially Bedstead) are very compressible.

4 months agoRemove .sfd from .htaccess file
Ben Harris [Sat, 18 Oct 2025 16:27:23 +0000 (17:27 +0100)]
Remove .sfd from .htaccess file

We don't serve and SFD files any more.

4 months agoAdd a paragraphs about the other semi-graphics Bedstead can do
Ben Harris [Sat, 4 Oct 2025 15:49:15 +0000 (16:49 +0100)]
Add a paragraphs about the other semi-graphics Bedstead can do

They could probably do with examples as well.

4 months agoLarge type M and W vertex components
Ben Harris [Tue, 23 Sep 2025 08:44:24 +0000 (09:44 +0100)]
Large type M and W vertex components

4 months agoRemaining large type stem parts
Ben Harris [Tue, 23 Sep 2025 08:32:02 +0000 (09:32 +0100)]
Remaining large type stem parts

The ones that aren't separately encoded provided a clear indication of
how the numbered stem parts are meant to relate to the named ones, so
there weren't actually many decisions to make.

4 months agoLots of diagonal bits of large type pieces
Ben Harris [Mon, 22 Sep 2025 22:19:06 +0000 (23:19 +0100)]
Lots of diagonal bits of large type pieces

This is essentially all of them apart from the W and M pieces.  There
turn out to be obvious places to have the diagonals cross character-cell
boundaries such that they should all join up.  Whether this gives and
aesthetically tolerable outcome, I'm not so sure.

The W and M pieces are a bit confusing, because they're meant to span
two character cells vertically, but the obvious design doesn't.

4 months agoThree more HP large type components
Ben Harris [Sun, 21 Sep 2025 23:35:02 +0000 (00:35 +0100)]
Three more HP large type components

These are based on the existing arcs in obvious ways.

4 months agoInitial HP large type pieces (U+1CE1A onwards)
Ben Harris [Sun, 21 Sep 2025 20:23:22 +0000 (21:23 +0100)]
Initial HP large type pieces (U+1CE1A onwards)

This batch are the ones that can be implemented using the ordinary
box-drawing characters (and probably should have been unified with
them by Unicode).

4 months agoConvert some 8-cell mosaic glyphs into aliases to 6-cell
Ben Harris [Wed, 24 Sep 2025 21:58:39 +0000 (22:58 +0100)]
Convert some 8-cell mosaic glyphs into aliases to 6-cell

Because in Bedstead the cell boundaries of 8-cell mosaic glyphs are a
superset of those for 6-cell mosaic glyphs, each of the existing
6-cell glyphs has an identical 8-cell glyph whose middle two rows of
cells are identical.  Thus, these 8-cell glyphs can be aliases for the
corresponding 6-cell glyph.  I've implemented this as a macro called
A() that can be mixed in with the existing O() macros in the section
of the glyphs table that generates U+1CD00..U+1CDE5, aliasing them to
characters in U+1FB00..U+1FB3B.  That makes the table even more
confusing, but at least it's compact.

4 months agoAdd remaining 8-cell mosaic characters
Ben Harris [Wed, 24 Sep 2025 21:09:22 +0000 (22:09 +0100)]
Add remaining 8-cell mosaic characters

These are the ones scattered across Unicode and not in the main
U+1CD00..U+1CDE5 block that weren't already present.  They're aliased to
the corresponding 6-cell characters.

4 months agoNotes on what the missing 8-cell mosaics are unified with
Ben Harris [Tue, 23 Sep 2025 22:23:44 +0000 (23:23 +0100)]
Notes on what the missing 8-cell mosaics are unified with

4 months agoMain block of 8-cell mosaics in Symbols for Legacy Computing Supplement
Ben Harris [Tue, 23 Sep 2025 21:49:35 +0000 (22:49 +0100)]
Main block of 8-cell mosaics in Symbols for Legacy Computing Supplement

These were mostly generated from UnicodeData.txt with a dodgy Perl
one-liner and an Emacs keyboard macro.  The dodgy one-liner was (wrapped
onto more lines):

grep "BLOCK OCTANT" ~/Downloads/UnicodeData.txt |
perl -pe '/OCTANT-(\d+)/; $i=""; map{vec($i,$_-1,1)=1}split(//,$1);
          $_=sprintf("%02X",ord($i))." $_";'

Now I need to find the characters elsewhere in Unicode that correspond
with the gaps in the table.

4 months agoAdd support for generating 8-cell mosaic graphics
Ben Harris [Tue, 23 Sep 2025 21:44:19 +0000 (22:44 +0100)]
Add support for generating 8-cell mosaic graphics

This follows the pattern of the 6-cell and 4-cell versions, but without
separated mode because Unicode doesn't have that.  This required making
the bitmap data into an unsigned char array to allow for using all eight
bits.

The cell boundaries are chosen so that they line up with existing 6-cell
and 4-cell boundaries.  So we have row heights of [3,2,2,3], which is
maybe less pretty than [3,2,3,2], but is more in keeping with the
existing mosaics.  Indeed, it means that the existing 4-cell and 6-cell
contiguous characters could be expressed in 8-cell terms if I wanted to.

4 months agoEnlarge radius of box drawings arcs
Ben Harris [Mon, 22 Sep 2025 21:11:17 +0000 (22:11 +0100)]
Enlarge radius of box drawings arcs

Before, the diagonal parts were the same as in the capital O.  But that
was already a bit square, and the shapes one would draw with the box
drawing characters will generally be bigger.  So now I've cut a bit more
off the corners.  This means that arcs that join to the right need the
recent change to add JOIN_R in order to join up properly.

With this change, if you try to draw a circle with them, you get an
octagon with side lengths 2, 2.8, 6 instead of 4, 1.4, 8, which I think
is an improvement.

4 months agoAdd JOIN_R and JOIN_D flags, and extend effects of JOIN_*
Ben Harris [Mon, 22 Sep 2025 19:27:46 +0000 (20:27 +0100)]
Add JOIN_R and JOIN_D flags, and extend effects of JOIN_*

The new flags mark glyphs that join to the right and downwards.  The
effect of these, and a new effect of JOIN_U and JOIN_L, is to arrange
that getpix() treats pixels beyond the edge of the character cell as
repeating the last row of real pixels.

In practice, this means that a diagonal stroke touching the right or
bottom edge of the cell will now be drawn as though it turns into an
orthogonal stroke across the edge rather than as though it stops.  This
doesn't affect the outline of any existing glyph.

There is a more subtle consequence, which is that joining glyphs no
longer get edge hints on their joining edges.  I think that's an
improvement: such hints might move those edges so that they don't touch
the adjacent character, which would be rather unhelpful.

5 months agoMove various small caps to dedicated Unicode code points
Ben Harris [Sat, 20 Sep 2025 22:06:20 +0000 (23:06 +0100)]
Move various small caps to dedicated Unicode code points

Specifically, this adds:

U+1D0C LATIN LETTER SMALL CAPITAL L WITH STROKE
U+1D23 LATIN LETTER SMALL CAPITAL EZH
U+1D7B LATIN SMALL CAPITAL LETTER I WITH STROKE
U+1DF04 LATIN LETTER SMALL CAPITAL L WITH BELT
U+1DF10 LATIN LETTER SMALL CAPITAL TURNED K

Three of this had private-use encodings that appeared in earlier
Bedstead releases.  These encodings have been preserved for backward
compatibility.

5 months agoAdd old-style numerals
Ben Harris [Sat, 20 Sep 2025 21:23:14 +0000 (22:23 +0100)]
Add old-style numerals

I've designed new versions of 0, 1, and 2 that fit within the
x-height.  6 and 8 don't change at all (and are unmapped).  The other
digits are all moved down by two pixels so their top edges are at the
x-height and their bottom edges at the descender height.

This is very simple (and much simpler than my previous attempts), but
seems to be satisfactory.

5 months agoU+01B7 LATIN CAPITAL LETTER EZH
Ben Harris [Mon, 8 Sep 2025 22:16:01 +0000 (23:16 +0100)]
U+01B7 LATIN CAPITAL LETTER EZH

It's just the lower-case moved up the baseline, but the small-cap is
new.

5 months agoU+2C6D LATIN CAPITAL LETTER ALPHA
Ben Harris [Mon, 8 Sep 2025 21:52:43 +0000 (22:52 +0100)]
U+2C6D LATIN CAPITAL LETTER ALPHA

Used by at least one African language that we otherwise support, and
trivially derived from the lower-case.

5 months agoBetter UALIAS() macro
Ben Harris [Mon, 8 Sep 2025 20:49:47 +0000 (21:49 +0100)]
Better UALIAS() macro

Now you _can_ pass an instance of U() as the first two arguments.

5 months agoMore modifier letters of quotation marks
Ben Harris [Sun, 7 Sep 2025 17:13:50 +0000 (18:13 +0100)]
More modifier letters of quotation marks

They're aliases of the normal versions.  I think Hawaiian probably
wants one.  Also converted modifier primes into aliases.

5 months agoMake all the capital Dcroat and African D into aliases of Eth
Ben Harris [Sun, 7 Sep 2025 17:04:48 +0000 (18:04 +0100)]
Make all the capital Dcroat and African D into aliases of Eth

This saves a few bytes and avoids some repetition.

5 months agoAdd a macro, UALIAS(), for aliases with Unicode mappings
Ben Harris [Sun, 7 Sep 2025 16:43:54 +0000 (17:43 +0100)]
Add a macro, UALIAS(), for aliases with Unicode mappings

ALIAS() is now implemented in terms of UALIAS().

5 months agoU+0194 LATIN CAPITAL LETTER GAMMA
Ben Harris [Sun, 7 Sep 2025 11:24:12 +0000 (12:24 +0100)]
U+0194 LATIN CAPITAL LETTER GAMMA

Hyperglot says that completes several more African languages including
Dinka.

5 months agoU+019D LATIN CAPITAL LETTER N WITH LEFT HOOK
Ben Harris [Sun, 7 Sep 2025 11:12:49 +0000 (12:12 +0100)]
U+019D LATIN CAPITAL LETTER N WITH LEFT HOOK

Hyperglot says this is all we're missing from Bambara, which has 4
million speakers.

5 months agoFinally solve the S-hachek problem
Ben Harris [Sun, 7 Sep 2025 10:48:34 +0000 (11:48 +0100)]
Finally solve the S-hachek problem

I had been trying to find an upper-case that was visibly distinct from
the existing lower-case, but I realised that I could do the same as we
do with accented 'o' and instead make a new lower-case version and
declare the existing glyph to be upper-case.  This seems to work
tolerably and removes the most embarrassing gaps in Bedstead's
repertoire.

5 months agoU+0197 LATIN CAPITAL LETTER I WITH STROKE
Ben Harris [Sun, 7 Sep 2025 10:19:40 +0000 (11:19 +0100)]
U+0197 LATIN CAPITAL LETTER I WITH STROKE

With a small-cap glyph and appropriate mappings.  Hyperglot says that
adds nine more languages.

5 months agoU+01B1 LATIN CAPITAL LETTER UPSILON
Ben Harris [Sun, 7 Sep 2025 10:13:45 +0000 (11:13 +0100)]
U+01B1 LATIN CAPITAL LETTER UPSILON

It's just an upside-down Omega.  Hyperglot says that gains us support
for five more languages.  The small-cap is just the already-existing
lower-case.

5 months agoAdded some useful African capitals
Ben Harris [Sun, 7 Sep 2025 09:56:12 +0000 (10:56 +0100)]
Added some useful African capitals

Not cities, but capital versions of some letters we already had in
lower-case for IPA.  Specifically:

U+0186 LATIN CAPITAL LETTER OPEN O
U+0189 LATIN CAPITAL LETTER AFRICAN D
U+0190 LATIN CAPITAL LETTER OPEN E
U+0196 LATIN CAPITAL LETTER IOTA
U+01B2 LATIN CAPITAL LETTER V WITH HOOK

Between them, Hyperglot thinks this gains us useful coverage of
languages with a few tens of millions of speakers, which seems like good
value to me.

The all also have small caps, and in the case of the African D all the
capital-D variants.

5 months agoProper names for Wgrave, wgrave, Wacute, wacute, Ygrave, and ygrave
Ben Harris [Sat, 6 Sep 2025 22:36:26 +0000 (23:36 +0100)]
Proper names for Wgrave, wgrave, Wacute, wacute, Ygrave, and ygrave

Turns out that these are in AGLFN.  No compatibility aliases because
they never appeared in a release with the wrong names.

5 months agoRedesign U+028B LATIN SMALL LETTER V WITH HOOK
Ben Harris [Sat, 6 Sep 2025 21:25:23 +0000 (22:25 +0100)]
Redesign U+028B LATIN SMALL LETTER V WITH HOOK

The International Phonetic Association's preferred sans-serif font
doesn't give this character a serif at the top left, so Bedstead
shouldn't either.  Also the bottom-left corner of the letter is subtly
curved, so I've rounded off that corner a bit as well.  The result is
more like the IPA's ideal and also easier to design a capital version
of.

5 months agoMore-consistent 'W' glyphs
Ben Harris [Sat, 6 Sep 2025 08:39:14 +0000 (09:39 +0100)]
More-consistent 'W' glyphs

Now all of the caps and small caps have a central peak four pixels
above the baseline, and all of the lower-case have a central peak
three pixels above the baseline.  The outer arms vary as necessary to
accommodate accents and for small caps.

5 months agoAdd W/w with grave and acute
Ben Harris [Fri, 5 Sep 2025 12:50:54 +0000 (13:50 +0100)]
Add W/w with grave and acute

Hyperglot says these are needed for Welsh, and they're trivial to
draw.

There seems to be some confusion around the proper shape for small-cap
W in Bedstead; I should investigate this in more detail.

5 months agoAdd Y/y with grave
Ben Harris [Fri, 5 Sep 2025 08:59:23 +0000 (09:59 +0100)]
Add Y/y with grave

They're trivial and Hyperglot says they're necessary for writing Welsh.

5 months agoAdd icircumflex.sc as an alias of Icircumflex
Ben Harris [Thu, 4 Sep 2025 21:00:02 +0000 (22:00 +0100)]
Add icircumflex.sc as an alias of Icircumflex

Spotted by Shaperglot.  I disagree with a lot of its complaints, but
in this it was entirely correct.

5 months agoTry to generate more-symmetric stem hints
Ben Harris [Sat, 30 Aug 2025 13:01:56 +0000 (14:01 +0100)]
Try to generate more-symmetric stem hints

When generating hints for a symmetric glyph like 'v', it's helpful if
the hits are symmetric because that means that the hinted bitmap is
also likely to be symmetric.  This is particularly visible on
Microsoft Windows where the version of 'v' before this patch ended up
horribly distorted when rendered at 20 ppem in Bedstead Condensed.  To
try to avoid such horrors, we now select hints starting at the outside
edges of the character and working inwards, instead of going from left
to right or top to bottom.  This means that where hints conflict,
we'll tend to choose the ones towards the outside edge of the
character, rather than towards the top or left.

This changes the hinting for 50 glyphs, but all in ways that look
superficially reasonable.

For more complicated characters we probably still want to think about
hint substitution, but that still scares me.

8 months agoUpdate version to 3.252 bedstead-3.252
Ben Harris [Tue, 27 May 2025 20:41:15 +0000 (21:41 +0100)]
Update version to 3.252

9 months agoQuick note on automated tools in CONTRIBUTING
Ben Harris [Wed, 21 May 2025 23:27:33 +0000 (00:27 +0100)]
Quick note on automated tools in CONTRIBUTING

It's apparent that the idea that you should disclose the use of such
tools is not as widespread as I'd thought, so I should make it
explicit.

10 months agoSwitch from asctime() to strftime()
Ben Harris [Tue, 25 Mar 2025 11:09:54 +0000 (11:09 +0000)]
Switch from asctime() to strftime()

C23 marks asctime() as deprecated and it seems polite to keep up with
that.  Using strftime() isn't noticeably more complicated: the "%c"
specifier does what we want and we don't get a spurious newline that
we have to remove again.

11 months agoReplace the one use of sprintf() with snprintf()
Ben Harris [Thu, 13 Mar 2025 13:49:43 +0000 (13:49 +0000)]
Replace the one use of sprintf() with snprintf()

It only acts on constant strings, so it can't actually overflow, but
this way I can assert() that it really doesn't.

11 months agoDon't emit counter hints for horizontal stems
Ben Harris [Mon, 3 Mar 2025 22:57:37 +0000 (22:57 +0000)]
Don't emit counter hints for horizontal stems

Microsoft Windows 11 pays some attention to counter hints, and the
results are disastrous.  Specifically, at awkward ppem, characters
with counter hints end up one pixel smaller that characters without
them.  That makes the counters the same size, and puts every
horizontal stem squarely on a pixel, but means that cap height is all
wobbly, which looks horrible.  Additionally, some characters ('2' and
'3', at least) end up grossly distorted, with the top of the character
either stretched way above the character cell or squashed down to the
centre line.

Turning off the counter hints solves these problems.  Windows does
then draw the 'B' with its centre-line below the centre rather than
above it, but that's not a regression from 002.009.  As far as I can
tell, FreeType 2.12.1 ignores counter hints entirely.  At least, the
output of ftlint at 11 ppem is the same before and after this change.

Vertical counter hints survive.  They're also ignored by FreeType
2.12.1 (as are all vertical stem hints), but they seem to have a
broadly positive effect in Windows.

11 months agoFurther SOURCE_DATE_EPOCH simplification
Ben Harris [Thu, 27 Feb 2025 23:00:24 +0000 (23:00 +0000)]
Further SOURCE_DATE_EPOCH simplification

Rather than mucking about with errno, we can just take advantage of the
fact that on overflow, strtoull() is specified to return ULLONG_MAX,
which is guaranteed to be (much) bigger than the maximum
SOURCE_DATE_EPOCH that we can cope with.  So our usual range check can
cope with overflow as well.

11 months agoHandle SOURCE_DATE_EPOCH in unsigned long long, not unitmax_t
Ben Harris [Thu, 27 Feb 2025 22:48:52 +0000 (22:48 +0000)]
Handle SOURCE_DATE_EPOCH in unsigned long long, not unitmax_t

unsigned long long is guaranteed to be big enough.  No need to go
bigger.

11 months agoSlightly simplify SOURCE_DATE_EPOCH handling
Ben Harris [Thu, 27 Feb 2025 22:32:19 +0000 (22:32 +0000)]
Slightly simplify SOURCE_DATE_EPOCH handling

Subtracting 30 years' worth of seconds from the date and then adding
2000 years is unnecessary when we can just add 1970 years instead.

11 months agoAdd a "Unique font identifier" string (name ID 3)
Ben Harris [Thu, 27 Feb 2025 09:49:38 +0000 (09:49 +0000)]
Add a "Unique font identifier" string (name ID 3)

This seems to be necessary for the font viewer in MS Windows 11 to
consider the font to be valid.  The semantics of this field are not
documented in the OpenType spec, but the Apple TrueType spec does at
least give an example.  I've roughly followed Apple's example, putting
together the full name, version number, and build date that we already
have to hand and include in the font.  Between them those should
uniquely identify reasonable builds of Bedstead fonts without adding
extra complexity or non-reproducibility.

12 months agoPolicy on Git commit messages in CONTRIBUTING
Ben Harris [Thu, 6 Feb 2025 10:53:38 +0000 (10:53 +0000)]
Policy on Git commit messages in CONTRIBUTING

I've never been comfortable with constructing or editing commit
messages that will appear under someone else's name, but on the other
hand I don't want to be forced either to use someone else's message
untouched or to remove their name from the "Author" field.  Allowing
myself to make clearly-marked edits seems to be a good compromise, and
square brackets are a common way of marking edits and editorial
comments.

12 months agoMore portable handling of SOURCE_DATE_EPOCH
Ben Harris [Tue, 4 Feb 2025 23:11:17 +0000 (23:11 +0000)]
More portable handling of SOURCE_DATE_EPOCH

Now we don't make any assumption about being on a POSIX system, and
instead have our own implementation of gmtime().  This turns out to be
shorter than the comment explaining why the previous code was more or
less valid.

While I'm in the area, also fail if the year is after 9999, since
asctime() causes undefined behaviour in those cases.

12 months agoUpdate rom.ps for renaming of ccedilla.angular to ccedilla.square
Ben Harris [Mon, 3 Feb 2025 22:36:21 +0000 (22:36 +0000)]
Update rom.ps for renaming of ccedilla.angular to ccedilla.square

12 months agoUpdate date at the head of bedstead.c
Ben Harris [Mon, 3 Feb 2025 09:39:10 +0000 (09:39 +0000)]
Update date at the head of bedstead.c

12 months agoClarify 3.251 release notes
Ben Harris [Mon, 3 Feb 2025 00:32:37 +0000 (00:32 +0000)]
Clarify 3.251 release notes

Better late than never.

12 months agoUpdate version to 3.251 bedstead-3.251
Ben Harris [Sat, 1 Feb 2025 21:18:41 +0000 (21:18 +0000)]
Update version to 3.251

12 months agoRename "angular" cedilla as "square"
Ben Harris [Sun, 2 Feb 2025 11:29:26 +0000 (11:29 +0000)]
Rename "angular" cedilla as "square"

They both have angles, after all.  Also "square" sorts more
conveniently in the 'aalt' lookup.

12 months agoRough sketch of 3.251 release notes
Ben Harris [Sat, 1 Feb 2025 16:13:53 +0000 (16:13 +0000)]
Rough sketch of 3.251 release notes

12 months agoAdd private-use code points for new unmapped glyphs
Ben Harris [Sat, 1 Feb 2025 10:43:49 +0000 (10:43 +0000)]
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.

12 months agoAdd E with cedilla
Ben Harris [Thu, 30 Jan 2025 21:18:45 +0000 (21:18 +0000)]
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.

12 months agoGlyphs for G, K, L, N, and R with comma below
Ben Harris [Thu, 30 Jan 2025 21:07:41 +0000 (21:07 +0000)]
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.

12 months agoRedesign Hcedilla and hcedilla
Ben Harris [Thu, 30 Jan 2025 20:34:52 +0000 (20:34 +0000)]
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.

12 months agoAdd S with comma below
Ben Harris [Thu, 30 Jan 2025 14:15:44 +0000 (14:15 +0000)]
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'.

12 months agoAdd T with comma below
Ben Harris [Thu, 30 Jan 2025 14:11:02 +0000 (14:11 +0000)]
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.

12 months agoConvert cedillas under D to commas
Ben Harris [Thu, 30 Jan 2025 13:54:21 +0000 (13:54 +0000)]
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.

12 months agoSort elements of the FeatureIndices array by feature tag
Ben Harris [Wed, 29 Jan 2025 22:10:40 +0000 (22:10 +0000)]
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.

12 months agoAdd comments with feature tags for FeatureIndices
Ben Harris [Wed, 29 Jan 2025 21:40:32 +0000 (21:40 +0000)]
Add comments with feature tags for FeatureIndices

12 months agoUse a conventional lenof() macro for lengths of static arrays
Ben Harris [Wed, 29 Jan 2025 13:57:28 +0000 (13:57 +0000)]
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.

12 months agoAdd parameter labels for 'cvXX' features
Ben Harris [Tue, 28 Jan 2025 23:06:05 +0000 (23:06 +0000)]
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.

12 months agoSmall-cap and narrow forms of U+A780 (turned L)
Ben Harris [Mon, 27 Jan 2025 22:53:55 +0000 (22:53 +0000)]
Small-cap and narrow forms of U+A780 (turned L)

12 months agoAdd white (outline) versions of card suits
Ben Harris [Mon, 27 Jan 2025 14:08:29 +0000 (14:08 +0000)]
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.

13 months agoRedesign glottal-stop characters
Ben Harris [Sat, 18 Jan 2025 23:57:31 +0000 (23:57 +0000)]
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.

13 months agoAdd U+23E8 DECIMAL EXPONENT SYMBOL
Ben Harris [Sat, 18 Jan 2025 21:35:58 +0000 (21:35 +0000)]
Add U+23E8 DECIMAL EXPONENT SYMBOL

That seemed to be the only character needed by ALGOL 60 that I was
lacking.

13 months agoAdd 'ss05' which maps all of U+0020..U+007E to SAA5055 glyphs
Ben Harris [Sat, 18 Jan 2025 20:54:21 +0000 (20:54 +0000)]
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.

13 months agoSwitch to a variadic macro for generating alternate substitutions
Ben Harris [Sat, 18 Jan 2025 17:55:42 +0000 (17:55 +0000)]
Switch to a variadic macro for generating alternate substitutions

13 months agoAdd character variant for curly apostrophe (SAA5051/2)
Ben Harris [Sat, 18 Jan 2025 13:48:59 +0000 (13:48 +0000)]
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.

13 months agoRename parameters for CVXX macros to "V"
Ben Harris [Fri, 17 Jan 2025 00:16:31 +0000 (00:16 +0000)]
Rename parameters for CVXX macros to "V"

That makes things a little less verbose (for now).

13 months agoFill in 'cv38' with far too many kinds of capital 'D'
Ben Harris [Thu, 16 Jan 2025 23:53:53 +0000 (23:53 +0000)]
Fill in 'cv38' with far too many kinds of capital 'D'

13 months agoAdd narrow small-cap J to 'cv42'
Ben Harris [Thu, 16 Jan 2025 23:04:17 +0000 (23:04 +0000)]
Add narrow small-cap J to 'cv42'

All the other J-based characters are either narrow already or
unsuitable for narrowing.

13 months agoFill out 'cv44' with narrow capital Ls
Ben Harris [Thu, 16 Jan 2025 22:55:54 +0000 (22:55 +0000)]
Fill out 'cv44' with narrow capital Ls

13 months agoFill out 'cv96' with all the angular cedillas
Ben Harris [Thu, 16 Jan 2025 22:14:37 +0000 (22:14 +0000)]
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.

13 months agoStop trying to indent XML output
Ben Harris [Thu, 16 Jan 2025 13:50:00 +0000 (13:50 +0000)]
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.

13 months agoExpand some comments
Ben Harris [Wed, 15 Jan 2025 22:53:26 +0000 (22:53 +0000)]
Expand some comments

Now that we use strings for bitmaps, the comments can be a little less
abbreviated.

13 months agoMore large, accented lower-case 'o's for 'cv79'
Ben Harris [Wed, 15 Jan 2025 22:45:06 +0000 (22:45 +0000)]
More large, accented lower-case 'o's for 'cv79'

I thought about just re-using the ".sc" glyph names, but that seemed
wrong.

13 months agoExtend 'cv74' to other characters based on lower-case 'j'
Ben Harris [Wed, 15 Jan 2025 21:17:58 +0000 (21:17 +0000)]
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'.