chiark / gitweb /
bedstead.git
5 months agoUpdate comment on compare_glyphs_by_ffid()
Ben Harris [Sun, 3 Nov 2024 13:17:23 +0000 (13:17 +0000)]
Update comment on compare_glyphs_by_ffid()

It's not necessary any more, but it does seem to make the output file
smaller so it can stay for now.

5 months agoNote that TTX overrides hhea.numberOfHMetrics
Ben Harris [Sun, 3 Nov 2024 09:33:16 +0000 (09:33 +0000)]
Note that TTX overrides hhea.numberOfHMetrics

5 months agoAdjust indentation of CFF XML
Ben Harris [Sun, 3 Nov 2024 08:35:40 +0000 (08:35 +0000)]
Adjust indentation of CFF XML

It's not perfect, but it's prettier.

5 months agoRemove extraglyphs variable that's no longer needed
Ben Harris [Sun, 3 Nov 2024 00:16:17 +0000 (00:16 +0000)]
Remove extraglyphs variable that's no longer needed

5 months agoDon't emit unnecessary CFF DICT entries
Ben Harris [Sat, 2 Nov 2024 23:02:37 +0000 (23:02 +0000)]
Don't emit unnecessary CFF DICT entries

In several cases, Bedstead uses the defaults, so there's no need to
mention them.

5 months agoRemove newlines from charstrings in TTX output
Ben Harris [Sat, 2 Nov 2024 22:38:16 +0000 (22:38 +0000)]
Remove newlines from charstrings in TTX output

This does make the file rather wide, but I think it also makes it
easier to find what you're looking for.

5 months agoCreate a subroutine for each aliased glyph
Ben Harris [Sat, 2 Nov 2024 22:31:01 +0000 (22:31 +0000)]
Create a subroutine for each aliased glyph

So both the original name and any aliases can then call the subroutine
instead.

5 months agoCorrect charstring stack accounting in emit_contour()
Ben Harris [Sat, 2 Nov 2024 22:10:33 +0000 (22:10 +0000)]
Correct charstring stack accounting in emit_contour()

The first point doesn't count because it gets an rmoveto rather than an
rlineto.

5 months agoMake aliases work again, inefficiently
Ben Harris [Sat, 2 Nov 2024 22:07:23 +0000 (22:07 +0000)]
Make aliases work again, inefficiently

This pulls the conditional that works out how to render a glyph into
it's own function, doglyph(), that also handles indirecting through
aliases.  Later maybe we'll properly use subroutines to share the
charstrings for aliased glyphs.

5 months agoPut the charstring cursor in a local variable
Ben Harris [Sat, 2 Nov 2024 19:32:17 +0000 (19:32 +0000)]
Put the charstring cursor in a local variable

5 months agoCombine successive rlineto operators
Ben Harris [Sat, 2 Nov 2024 19:25:41 +0000 (19:25 +0000)]
Combine successive rlineto operators

In a Type 2 charstring, an rlineto operator can take up to 24 pairs of
co-ordinates, so most contours need only one rmoveto and one rlineto.

5 months agoDon't emit first point of a contour twice
Ben Harris [Sat, 2 Nov 2024 19:24:42 +0000 (19:24 +0000)]
Don't emit first point of a contour twice

Type 2 charstrings implicitly close each contour with a line, so there's
no need for us to explicitly do so.

5 months agoEmit 'CFF ' and 'hmtx' tables for TTX (mostly)
Ben Harris [Sat, 2 Nov 2024 17:50:31 +0000 (17:50 +0000)]
Emit 'CFF ' and 'hmtx' tables for TTX (mostly)

The left sidebearings in 'hmtx' are not set yet, and there are (of
course) no hints, but the glyphs are the right shapes.

5 months agocmap fixup
Ben Harris [Sat, 2 Nov 2024 17:49:57 +0000 (17:49 +0000)]
cmap fixup

5 months agoGenerate 'post' table for TTX
Ben Harris [Sat, 2 Nov 2024 16:39:50 +0000 (16:39 +0000)]
Generate 'post' table for TTX

5 months agoGenerate 'cmap' table for TTX
Ben Harris [Sat, 2 Nov 2024 16:35:34 +0000 (16:35 +0000)]
Generate 'cmap' table for TTX

TTX currently refuses to compile it, but I suspect that's because the
font still has no glyphs.

5 months agoGenerate 'name' table for TTX
Ben Harris [Sat, 2 Nov 2024 15:26:04 +0000 (15:26 +0000)]
Generate 'name' table for TTX

5 months agoMacros for the common TTX pattern <foo value='bar'/>
Ben Harris [Sat, 2 Nov 2024 14:41:34 +0000 (14:41 +0000)]
Macros for the common TTX pattern <foo value='bar'/>

That makes things a little less verbose.

5 months agoGenerate 'OS/2' table for TTX
Ben Harris [Sat, 2 Nov 2024 13:53:55 +0000 (13:53 +0000)]
Generate 'OS/2' table for TTX

5 months agoUse constants for ascent, descent, etc
Ben Harris [Sat, 2 Nov 2024 11:40:09 +0000 (11:40 +0000)]
Use constants for ascent, descent, etc

This way there won't be quite so many magic numbers in the font metrics.

5 months agoGenerate 'maxp' table for TTX
Ben Harris [Sat, 2 Nov 2024 10:21:58 +0000 (10:21 +0000)]
Generate 'maxp' table for TTX

5 months agoGenerate 'hhea' table for TTX
Ben Harris [Sat, 2 Nov 2024 10:16:36 +0000 (10:16 +0000)]
Generate 'hhea' table for TTX

5 months agoGenerate 'head' table for TTX
Ben Harris [Sat, 2 Nov 2024 10:02:28 +0000 (10:02 +0000)]
Generate 'head' table for TTX

5 months agoMinimal infrastructure for going via TTX rather than SFD
Ben Harris [Sat, 2 Nov 2024 08:46:28 +0000 (08:46 +0000)]
Minimal infrastructure for going via TTX rather than SFD

bedstead.c outputs an utterly minimal TTX file containing no tables, and
TTX compiles it into a similarly minimal OTF.  Which Ghostscript then
complains about.

FontForge is an impressive application, but it's not well-suited to
being part of a mechanical font-production pipeline.  The SFD format is
weird and rather difficult to generate, and FontForge imposes rather
more of its own opinions on the output than I'd like.

TTX is a lower-level format, and while it's a little bit weird, most of
it's weirdness comes from being a faithful representation of the
structure of an OpenType font.  Ideally I'd like something a little
higher-level, but a format that's too low-level is much easier to work
with than one that's too high-level.  The obvious alternative is UFO,
which is very popular but looks like being a pain to generate from plain
C.

Looking to the future, I like the idea of a variable version of
Bedstead, and neither SFD nor UFO seems to support that very well.  In
UFO's case, it seems that the convention is to create UFOs at various
points in the design space and then have a tool interpolate between
them, which seems wrong when they're all procedurally generated from the
same source.  TTX will allow me to directly generate the variation
tables, if I can understand how they work.

5 months agoWibblings about version numbers
Ben Harris [Thu, 14 Nov 2024 22:25:08 +0000 (22:25 +0000)]
Wibblings about version numbers

5 months agoFontmap is required by .bdf.ps files
Ben Harris [Sat, 2 Nov 2024 01:18:19 +0000 (01:18 +0000)]
Fontmap is required by .bdf.ps files

5 months agoAdd DEFAULT_CHAR to BDF
Ben Harris [Fri, 1 Nov 2024 20:42:22 +0000 (20:42 +0000)]
Add DEFAULT_CHAR to BDF

Also sort properties into the order they appear in the XLFD spec.

5 months agoCorrect weight and width names in BDF
Ben Harris [Fri, 1 Nov 2024 19:48:34 +0000 (19:48 +0000)]
Correct weight and width names in BDF

They shouldn't have leading spaces.

5 months agoAdd FACE_NAME property to BDF
Ben Harris [Fri, 1 Nov 2024 19:43:43 +0000 (19:43 +0000)]
Add FACE_NAME property to BDF

5 months agoAdd FONT_VERSION property to BDF
Ben Harris [Fri, 1 Nov 2024 19:41:08 +0000 (19:41 +0000)]
Add FONT_VERSION property to BDF

5 months agoSwitch build system to generating BDF via PostScript
Ben Harris [Fri, 1 Nov 2024 14:39:15 +0000 (14:39 +0000)]
Switch build system to generating BDF via PostScript

As far as I can see, the new BDF files are now as good as the
FontForge-generated ones.

5 months agoAdd support for choosing font size and weight in BDF generation
Ben Harris [Fri, 1 Nov 2024 14:38:39 +0000 (14:38 +0000)]
Add support for choosing font size and weight in BDF generation

5 months agoMore BDF properties and a proper XLFD name
Ben Harris [Fri, 1 Nov 2024 10:18:14 +0000 (10:18 +0000)]
More BDF properties and a proper XLFD name

5 months agoRough Makefile bits for new BDF generation
Ben Harris [Fri, 1 Nov 2024 00:41:50 +0000 (00:41 +0000)]
Rough Makefile bits for new BDF generation

5 months agoAdd rough support for generating BDF without FontForge
Ben Harris [Thu, 31 Oct 2024 23:34:18 +0000 (23:34 +0000)]
Add rough support for generating BDF without FontForge

This is extremely silly, but it's actually quite functional and
surprisingly compact.  bedstead.c gains the ability to generate a
PostScript file that emits a BDF file rendering each glyph into an image
and then dumping the image in hex.

I still need to get the font metadata right, which is my main reason for
wanting to get away from FontForge, but that shouldn't be difficult.
And the Makefile needs to be updated to make this work properly.  But
the bitmaps are coming out correctly.

5 months agoUse EXIT_SUCCESS and EXIT_FAILURE
Ben Harris [Sun, 10 Nov 2024 09:27:31 +0000 (09:27 +0000)]
Use EXIT_SUCCESS and EXIT_FAILURE

This is a bit of C pedantry.  POSIX requires that an exit status of
zero is success and non-zero is failure, but the C standard says no
such thing.  Instead it provides EXIT_SUCCESS and EXIT_FAILURE.  Since
Bedstead aspires to work on non-POSIX systems, it should use the
defined constants.  Also removing magic numbers is a good thing.

5 months agoMake it safe to call fullname_to_fontname() twice
Ben Harris [Sat, 2 Nov 2024 15:18:55 +0000 (15:18 +0000)]
Make it safe to call fullname_to_fontname() twice

5 months agoAnother capital esszett link
Ben Harris [Thu, 7 Nov 2024 23:37:33 +0000 (23:37 +0000)]
Another capital esszett link

6 months agoMap the .notdef character at U+F1FF
Ben Harris [Fri, 1 Nov 2024 20:36:23 +0000 (20:36 +0000)]
Map the .notdef character at U+F1FF

It should be the DEFAULT_CHAR in BDF, but that needs it to have an
encoding.  U+2395 APL FUNCTIONAL SYMBOL QUAD happens to look
identical, but I don't think I should rely on that.

6 months agoCorrect Wdieresis small-cap
Ben Harris [Tue, 29 Oct 2024 22:39:04 +0000 (22:39 +0000)]
Correct Wdieresis small-cap

Wdieresis.sc is obviously wrong: a capital shouldn't have an 'smcp'
mapping.  A 'c2sc' mapping for that character would also be wrong
because it's already squashed to fit under its accent.  On the other
hand, there should be a wdieresis.sc that maps to the upper-case,
because the characters are slightly different.

Wdieresis.sc is retained as a compatibility alias (for Wdieresis),
just in case.

6 months agoSAA5050 reverse-engineering links
Ben Harris [Tue, 29 Oct 2024 09:35:03 +0000 (09:35 +0000)]
SAA5050 reverse-engineering links

6 months agoAdd headings in NOTES
Ben Harris [Tue, 29 Oct 2024 09:34:54 +0000 (09:34 +0000)]
Add headings in NOTES

6 months agoMove dot in Ldot and corresponding small cap leftwards
Ben Harris [Tue, 29 Oct 2024 00:42:07 +0000 (00:42 +0000)]
Move dot in Ldot and corresponding small cap leftwards

It should be centred between the uprights of the Ls, and that makes it
so.  Sadly, it's not possible to do the same for the lower-case.

Also add a relevant link to NOTES.

6 months agoSome thoughts on UnitsPerEm
Ben Harris [Mon, 28 Oct 2024 15:05:11 +0000 (15:05 +0000)]
Some thoughts on UnitsPerEm

6 months agoExplicitly set OS2Vendor to 'PfEd'
Ben Harris [Sun, 27 Oct 2024 11:56:30 +0000 (11:56 +0000)]
Explicitly set OS2Vendor to 'PfEd'

That's the default value that FontForge uses.  I'd like to change it,
but fontconfig makes it available to applications as "foundry" and I
somehow ended up with Emacs recording that in its configuration.  So if
I'm going to make that change I think it should go with a major version
bump.

But at least I can make sure it doesn't change unexpectedly and give
myself somewhere to make the change when it comes.

6 months agoStop dopalt() reading off the end of the character bitmap
Ben Harris [Sat, 26 Oct 2024 18:00:39 +0000 (19:00 +0100)]
Stop dopalt() reading off the end of the character bitmap

Spotted by GCC -Warray-bounds.

6 months agoUpdate editor to emit the new style of character bitmap
Ben Harris [Sat, 26 Oct 2024 17:58:25 +0000 (18:58 +0100)]
Update editor to emit the new style of character bitmap

6 months agoSwitch to using string constants for character bitmaps
Ben Harris [Sat, 26 Oct 2024 15:25:14 +0000 (16:25 +0100)]
Switch to using string constants for character bitmaps

Future versions of C are likely to make octal integer constants
obsolescent.  Switching to something non-obsolete seems wise, and also
using octal character constants saves eight characters per line that I
can use for other things.

I did consider just using one character per row, but I think that might
be a little too hard to read.

6 months agoTidy up Creative-Commons-related verbiage in HACKING
Ben Harris [Wed, 23 Oct 2024 21:45:29 +0000 (22:45 +0100)]
Tidy up Creative-Commons-related verbiage in HACKING

Specifically, "declaration" is not a usual noun for CC0, and "Creative
Commons" isn't usually followed by "Corporation".

6 months agoAdd some SPDX-License-Identifier headers
Ben Harris [Wed, 23 Oct 2024 20:17:04 +0000 (21:17 +0100)]
Add some SPDX-License-Identifier headers

In places where they don't get in the way.

6 months agoMake co-ordinate systems more sensible
Ben Harris [Mon, 21 Oct 2024 08:31:57 +0000 (09:31 +0100)]
Make co-ordinate systems more sensible

The SAA5050 character images appear at the bottom-right corner of the
character cell, with a blank pixel to the top and the left.  This can
be seen if you put am alphanumeric character and a mosaic graphics
character side-by-side, since mosaic graphics characters fill the
entire character cell.

However, when I first made Bedstead, I put the character images in the
top-right corner, and the co-ordinate system matched that.  When I
fixed this in 2013 (commit 7bea0c6fadc35de50ea08eb184d4b15a7b411ef3),
I just did it by adjusting the final transformation of the vector
co-ordinates, leaving all the internal co-ordinate systems intact.
This was visible when I added mosaic graphics, which had to be offset
by one pixel to compensate.

Now I've finally corrected the problem somewhat properly.  Pixel
co-ordinates count from (0,0) in the top-left corner of the character
cell.  Vector co-ordinates count from (0,0) in the bottom-left corner
and are offset to the baseline on emission.  The conversion between
the two forms is still weirdly spread all over the place though.

6 months agoUpdate version to 002.009 bedstead-002.009
Ben Harris [Sat, 19 Oct 2024 20:02:11 +0000 (21:02 +0100)]
Update version to 002.009

This release is just to give the Debian build a more sensible base to
work from.

6 months agoState default author/licence in HACKING
Ben Harris [Sun, 13 Oct 2024 15:09:28 +0000 (16:09 +0100)]
State default author/licence in HACKING

Now that all the files are either mine or have other explicitly stated
authorship.

6 months agoUpdate HACKING document for editor changes
Ben Harris [Sun, 13 Oct 2024 14:06:41 +0000 (15:06 +0100)]
Update HACKING document for editor changes

6 months agoeditor: miscellaneous source cleanups.
Simon Tatham [Sun, 13 Oct 2024 10:05:01 +0000 (11:05 +0100)]
editor: miscellaneous source cleanups.

Apparently I didn't know about chained comparisons when I wrote this
code, so I didn't take the opportunity to write '0 <= x < limit'.

Also, removed the wildcard import from tkinter, replacing it with
explicit references to the things needed. There weren't that many of
them, so I think the 'import *' didn't gain much.

6 months agoeditor: better error message on paste failure.
Simon Tatham [Sun, 13 Oct 2024 09:52:47 +0000 (10:52 +0100)]
editor: better error message on paste failure.

Apparently I was incredibly lazy at some point in the past and forgot
to say what the problem was when the paste data couldn't be matched
against the regex.

6 months agoeditor: better ways to find the bedstead executable.
Simon Tatham [Sun, 13 Oct 2024 09:50:37 +0000 (10:50 +0100)]
editor: better ways to find the bedstead executable.

Previously the editor just expected to find it in your cwd. Now by
default it looks in the same directory as its own script, which means
you can run it from some other directory.

Also, I've provided a command-line option to override the default, in
case you keep the executable somewhere else again.

6 months agoeditor: put all the Tk work into a class.
Simon Tatham [Sun, 13 Oct 2024 09:36:22 +0000 (10:36 +0100)]
editor: put all the Tk work into a class.

The previous code organisation had a tiny 'Container' classlet that
held all the mutable variables, just so that all the event handler
functions could reach into it and modify it without having to faff
with 'global'.

But if you're going to make that much of a class, it makes more sense
to go further, and make all those functions _methods_ of the class. So
here's a reorganisation that wraps up the Tk code into a more or less
conventional class structure.

The patch for this commit looks like a total rewrite, but it's not
really: everything is indented further to the right (with a couple of
reflowings of long lines), and a lot of variables have a new 'self.'
on the front, but in other respects the code is substantially
unchanged.

6 months agoeditor: commit to Python 3.
Simon Tatham [Sun, 13 Oct 2024 09:16:31 +0000 (10:16 +0100)]
editor: commit to Python 3.

At the time I wrote this editor, it was sensible to try to be Python
2/3 agnostic. P2 is now thoroughly obsolete, so I've removed the P2
affordances. That lets me fix the shebang line to say 'python3', and
chmod the file +x, so that you can run it by its name.

Also, it can be renamed to just 'editor', because now that it's
executable, the fact that it's in Python is nothing but an internal
implementation detail.

6 months agoeditor.py: add a comment including authorship and licence.
Simon Tatham [Sun, 13 Oct 2024 09:19:31 +0000 (10:19 +0100)]
editor.py: add a comment including authorship and licence.

Ben is trying to make Bedstead into a Debian package, which involves
clarifying copyright and licences anywhere it's unclear. When I
contributed this editing tool I did it on a very informal basis ('look
at this fun hack!') and didn't make that clear. Time to fix that.

6 months agoRemove ZVBI-derived comment and code tables from NOTES
Ben Harris [Sat, 12 Oct 2024 22:35:54 +0000 (23:35 +0100)]
Remove ZVBI-derived comment and code tables from NOTES

For the most part they're not useful, and they're arguably under the GNU
GPL.  I've replaced them with an original prose description of some of
the interesting facts.  For everything else, you can go to ZVBI itself.

6 months agoProper licence etc for ZVBI bits in NOTES
Ben Harris [Sat, 12 Oct 2024 21:55:03 +0000 (22:55 +0100)]
Proper licence etc for ZVBI bits in NOTES

ZVBI is under LGPL v2, but the NOTES file isn't a library so I need to
licence the excerpt under GPL v2 instead.  But actually I think I want
to remove that text, so this is just to legitimise the distribution of
the Git history.

6 months agoCorrect SAA5050 ROM encoding
Ben Harris [Sat, 12 Oct 2024 16:05:57 +0000 (17:05 +0100)]
Correct SAA5050 ROM encoding

The character at 6/0 is emdash (5 pixels long), not endash (4 pixels
long).

6 months agoAdd a HACKING file that's a guide to the source code
Ben Harris [Sat, 12 Oct 2024 11:45:05 +0000 (12:45 +0100)]
Add a HACKING file that's a guide to the source code

Suggested by Ian Jackson.

7 months agoUpdate version to 002.008 bedstead-002.008
Ben Harris [Sat, 5 Oct 2024 11:53:24 +0000 (12:53 +0100)]
Update version to 002.008

7 months agoAdd U+2001 EM QUAD
Ben Harris [Sat, 5 Oct 2024 11:36:53 +0000 (12:36 +0100)]
Add U+2001 EM QUAD

It's canonically equivalent to U+2003 EM SPACE, so we should have
both.

7 months agoCSS: switch to monospace
Ben Harris [Thu, 3 Oct 2024 23:30:30 +0000 (00:30 +0100)]
CSS: switch to monospace

Safari badly misdisplays Bedstead in proportional mode.  This is
caused by a bug in WebKit, and I haven't found an acceptable
workaround.  Thus, I think the best thing to do is to turn off
proportional spacing on the Web page entirely.  I think it looks nice,
but even I'll admit that it's a little too tight, and I know others
prefer the monospaced version.

Also, I can't think of a way that a real chip anything like the
SAA5050 could produce proportionally-spaced text.  It's fundamentally
based on getting fed character data at a constant 1 MHz.  There's no
way it can ask for a character early because the previous one was
narrow.

7 months agoCSS: use "background" shorthand property
Ben Harris [Thu, 3 Oct 2024 23:06:49 +0000 (00:06 +0100)]
CSS: use "background" shorthand property

It's more compact and works just as well.  In fact, I think it might
work better on browsers that support background-image but not
background-size.  On such browsers the entire rule will be ignored,
which is what I want.  If the background image can't appear at
precisely the correct size, it shouldn't appear at all.

Of course, ideally on a browser that fails to display the background,
the title also wouldn't fade out to the left.  I wonder if there's a
sensible way to achieve that.

7 months agoMore details on WebKit bug, including link to bug tracker
Ben Harris [Thu, 3 Oct 2024 22:16:08 +0000 (23:16 +0100)]
More details on WebKit bug, including link to bug tracker

7 months agoLight HTML modernisation
Ben Harris [Fri, 27 Sep 2024 20:01:35 +0000 (21:01 +0100)]
Light HTML modernisation

The "sizes" attribute on the icon <links> wasn't allowed by XHTML 1.0
Strict, so I've removed the DOCTYPE for that.  Meanwhile HTML 5
doesn't want you declaring a <meta http-equiv="content-type">
specifying XHTML, so I've removed that as well.  So now it's
XML-syntax HTML 5, which seems sensible to me even if other people
don't like XML.

7 months agoUse no-break spaces in Web page
Ben Harris [Fri, 27 Sep 2024 19:21:23 +0000 (20:21 +0100)]
Use no-break spaces in Web page

I added them to Bedstead so I may as well use them.

7 months agoConvert the fading <div> in the Web page back to a <span>
Ben Harris [Fri, 27 Sep 2024 18:07:50 +0000 (19:07 +0100)]
Convert the fading <div> in the Web page back to a <span>

HTML doesn't allow <div> inside <h1>.  I found before that using a
<span> caused the background not to work.  That seems to be down to CSS2
section 10.6.1, describing inline, non-replaced elements: "The height of
the content area should be based on the font, but this specification
does not specify how."

Happily, we can just define this particular <span> to be a block
element, so that it behaves like a <div> even though it's a <span>.
That works fine, and because we're only using it to get a well-defined
content area it doesn't matter if it's ineffective when the stylesheet
is missing.

7 months agoUse EN DASH characters directly in Web page, without entities
Ben Harris [Fri, 27 Sep 2024 10:47:13 +0000 (11:47 +0100)]
Use EN DASH characters directly in Web page, without entities

The W3C HTML 5 checker objects to my use of "&ndash;" and I can't see
any reason why I should use it.  The page is unashamedly in UTF-8, so
there's not much benefit to singling out this one character for special
treatment.

The page is still officially in XHTML 1.0 Strict at the moment, but I
might want to change that, which is why I'm paying attention to an
HTML 5 checker.

7 months agoAdd the GeoGebra file that I used to sort out PANOSE
Ben Harris [Fri, 27 Sep 2024 09:58:15 +0000 (10:58 +0100)]
Add the GeoGebra file that I used to sort out PANOSE

7 months agoCorrect PANOSE Letterform value and extend to implausible weights
Ben Harris [Fri, 27 Sep 2024 09:57:22 +0000 (10:57 +0100)]
Correct PANOSE Letterform value and extend to implausible weights

7 months agoRework PANOSE generation
Ben Harris [Thu, 26 Sep 2024 23:54:20 +0000 (00:54 +0100)]
Rework PANOSE generation

The code predated the introduction of bold variants, so it was
significantly incorrect.  Also it appears that some software uses the
PANOSE classification to distinguish monospaced fonts.  After careful
study of the specification, I think all the variants of Bedstead can
be classified as text fonts, so I've removed the code that described
some variants as decorative.  Then I did some calculations and a lot
of playing around with GeoGebra to work out which parts of the design
space give which values of Stroke Variation, Letterform, and Midline.

7 months agoA few more subscript letters
Ben Harris [Thu, 26 Sep 2024 16:50:34 +0000 (17:50 +0100)]
A few more subscript letters

7 months agoGenerate the backward-compatibility *.sep6 glyphs correctly
Ben Harris [Thu, 26 Sep 2024 16:24:26 +0000 (17:24 +0100)]
Generate the backward-compatibility *.sep6 glyphs correctly

They should actually be separated, but I forgot to fix some pasted
text and so they weren't.

7 months agoNotes on a Safari display bug
Ben Harris [Thu, 26 Sep 2024 15:41:28 +0000 (16:41 +0100)]
Notes on a Safari display bug

7 months agoAdd link to gitweb
Ben Harris [Thu, 26 Sep 2024 13:57:57 +0000 (14:57 +0100)]
Add link to gitweb

It's in a rather weird place, but it's still useful.

7 months agoAdd U+2003 EM SPACE as a blank mosaic graphics character
Ben Harris [Thu, 26 Sep 2024 12:31:51 +0000 (13:31 +0100)]
Add U+2003 EM SPACE as a blank mosaic graphics character

At least Noto Sans and Noto Sans Symbols2 think that EM SPACE should
be the same width as mosaic graphics characters, and I think we could
do with a space that doesn't get changed by 'palt'.

7 months agoUpdate version to 002.007 bedstead-002.007
Ben Harris [Tue, 24 Sep 2024 13:23:15 +0000 (14:23 +0100)]
Update version to 002.007

7 months agoCorrect dependencies for all-web
Ben Harris [Tue, 24 Sep 2024 13:26:36 +0000 (14:26 +0100)]
Correct dependencies for all-web

7 months agoImprove comment to explain glyph ordering
Ben Harris [Mon, 23 Sep 2024 19:02:45 +0000 (20:02 +0100)]
Improve comment to explain glyph ordering

7 months agoAdd PUA code points for extra real glyphs
Ben Harris [Mon, 23 Sep 2024 15:28:35 +0000 (16:28 +0100)]
Add PUA code points for extra real glyphs

7 months agoAdd PUA mappings for separated 4-cell graphics
Ben Harris [Mon, 23 Sep 2024 15:22:59 +0000 (16:22 +0100)]
Add PUA mappings for separated 4-cell graphics

I'm a bit uncertain about this because I currently think these glyphs
shouldn't be in Bedstead at all.  They're not based on any real system
or standard, so they don't really have any good reason to be here.
But here they are nonetheless, at least until Bedstead 003.000.  So
while I don't really want to encourage their use, I think gratuitously
leaving them difficult to use will just annoy anyone who actually has
a use for them and they thus deserve encodings.

7 months agoAssign PUA code points for new small-cap glyphs
Ben Harris [Mon, 23 Sep 2024 14:52:01 +0000 (15:52 +0100)]
Assign PUA code points for new small-cap glyphs

7 months agoGenerate *.sep6 aliases the same way as contiguous versions
Ben Harris [Mon, 23 Sep 2024 14:16:36 +0000 (15:16 +0100)]
Generate *.sep6 aliases the same way as contiguous versions

That is, not generating aliases at all, becuase that's simpler and
actually makes the OTF file smaller.  Which makes me wonder if all
aliases should be done the same way, leaving FontForge to
automatically factor out common bits.

7 months agoComplicate the macro that generates contiguous mosaic graphics
Ben Harris [Mon, 23 Sep 2024 13:36:32 +0000 (14:36 +0100)]
Complicate the macro that generates contiguous mosaic graphics

It's now inkvoked the same way as the one that generates separated
graphics, which means those invocations can fit into eight fewer
lines.

7 months agoSlight mosaic graphics rationalisation
Ben Harris [Mon, 23 Sep 2024 13:17:21 +0000 (14:17 +0100)]
Slight mosaic graphics rationalisation

All the *.sep6 glyphs are now aliases for their proper Unicode 16
names.  And the 6-cell mosaic graphics are now in the section for
glyphs from real character generators, because that's what they are.

7 months agoUpdate Web page for Unicode 16.0 separated graphics
Ben Harris [Sun, 22 Sep 2024 09:56:27 +0000 (10:56 +0100)]
Update Web page for Unicode 16.0 separated graphics

7 months agoAdd separated mosaic graphics at Unicode 16.0 code points
Ben Harris [Sat, 21 Sep 2024 23:18:25 +0000 (00:18 +0100)]
Add separated mosaic graphics at Unicode 16.0 code points

That's U+1CE51 .. U+1CE8F.

8 months agoPut bitmap data and alias target into a union
Ben Harris [Thu, 18 Jul 2024 11:59:55 +0000 (12:59 +0100)]
Put bitmap data and alias target into a union

A character can't both be an alias and have its own bitmap data, so we
may as well overlap them.  Wrapping them in a union doesn't require any
changes to the syntax of the glyphs array because C allows for
incomplete bracketing of initialisers.  Because the union doesn't have a
name, its members can be accessed as though they're members of the
containing struct, which means that accesses to them don't need to
change.

There is a new flag to mark a glyph as an alias since "alias_of == NULL"
no longer works, and a corresponding change to the ALIAS() macro.

This saves about 20K of bedstead's data segment on a 64-bit system,
which is kind of silly but it's satisfying nonetheless.

8 months agoOutput glyphs in an order that FontForge won't change
Ben Harris [Sat, 1 Jun 2024 22:18:25 +0000 (23:18 +0100)]
Output glyphs in an order that FontForge won't change

FontForge has opinions about what order glyphs in an OpenType font
should appear in, at least some of them being mandated by the OpenType
spec (for instance that .notdef must by glyph 0).  When outputting an
OpenType font, FontForge re-orders it in accordance with these opinions.

I expect that this will be a problem if I want to emit a table that
FontForge doesn't understand, since it won't be able to correct the
glyph indexes in that table.  Thus I've added code to re-order the
glyphs in Bedstead such that FontForge won't re-order them.  This should
mean that bedstead.c can safely use the glyph indexes that it generates
without worrying that FontForge might change them.

I don't think FontForge minds what order unencoded glyphs appear in, but
I've defined them to be in strcmp() order of glyph name so that they're
at least somewhat stable.  Before this, they were in the same order as
in the source file.

8 months agoTidy up function definitions
Ben Harris [Sun, 18 Aug 2024 12:18:50 +0000 (13:18 +0100)]
Tidy up function definitions

Consistently put a newline before each function name, and use "void"
as the parameter list of functions that take no parameters.

8 months agoConsistent apostrophes in HTML
Ben Harris [Sat, 13 Jul 2024 22:39:51 +0000 (23:39 +0100)]
Consistent apostrophes in HTML

8 months agoAdd an icon to the Web page
Ben Harris [Sat, 13 Jul 2024 15:54:09 +0000 (16:54 +0100)]
Add an icon to the Web page

I generate various sizes because the 16-pixel version looks better than
the scaled-down larger versions.

8 months agoGenerate sample images in colour to match Web page
Ben Harris [Sat, 13 Jul 2024 14:52:22 +0000 (15:52 +0100)]
Generate sample images in colour to match Web page

8 months agoUse the global nglyphs variable in glyph_complement()
Ben Harris [Thu, 11 Jul 2024 22:40:31 +0000 (23:40 +0100)]
Use the global nglyphs variable in glyph_complement()

10 months agoConvert indentation to tabs where it had been spaces
Ben Harris [Wed, 10 Jul 2024 20:01:45 +0000 (21:01 +0100)]
Convert indentation to tabs where it had been spaces

Now that at least my own edits shouldn't break this.