609 Commits

Author SHA1 Message Date
Ben Harris
a777d5117f A few other musical symbols that happen to be feasible
My segno is missing the conventional dots, though.
2020-04-26 15:27:28 +01:00
Ben Harris
a2c30aced9 Double flat sign
Slight creativity required, but I think it works.
2020-04-26 15:16:36 +01:00
Ben Harris
b62dd8d519 An assortment of nice obvious musical symbols
Mostly bar lines and staves.
2020-04-26 15:09:56 +01:00
Ben Harris
84faed5e4c Add a few musical symbols
I thought repeat marks might be useful, and ended up doing a few others.  
The repeat marks and clefs are based on the assumption that a five-line 
stave fills the character cell and that you're using the clefs in their 
most common position.
2020-04-26 12:34:46 +01:00
Ben Harris
15fe3fb95e Make 'aalt' the first lookup in the font
The OpenType spec says it should be so.
2020-04-02 10:01:51 +01:00
Ben Harris
be7f82e324 A few more small-cap fragments 2020-04-02 09:59:07 +01:00
Ben Harris
c436332f25 Don't emit name ID 16 without 17
The OpenType spec isn't entirely confident here, but it seems to think
that name ID 16 is unnecessary if it's identical to 1, and it makes
sense to me that 16/17 should go together as a pair just like 1/2 do.
2020-03-30 21:02:54 +01:00
Ben Harris
7be4eb6945 Actually generate the 'ss14' substitutions
Without then, the feature doesn't work, and more surprisingly
FontForge puts the description of the feature into string ID 0, which
is meant to be the copyright notice.
2020-03-30 20:26:29 +01:00
Ben Harris
6c0e11d6f5 Update version to 002.001 2020-03-29 22:25:20 +01:00
Ben Harris
54d595b850 Make the 'aalt' lookup work properly
Emitting a separate "AlternateSubs2" line for each target doesn't work
properly, so we make a second pass over the alternates for the current
glyph, constructing a single "AlternateSubs2" line afer doing all the
"Substitution2"s.
2020-03-28 22:47:57 +00:00
Ben Harris
b779a48d68 Rationalise mosaic graphics implementation
The "separated graphics" flag is now in the "flags" field, rather than
in the character data, and the bits specifying which cells are painted
are now contiguous.  Also the MOS flag is now called MOS6, to go with
MOS4.  This makes the specification of the ZVBI code points more
complex, but cleans up the Unicode ones, which I think is appropriate.

On the way, I found that 'palt' was being applied to 4-cell mosaic
graphics and fixed that.
2020-03-28 22:13:41 +00:00
Ben Harris
eb3418be04 Add support for separated 4-cell mosaic graphics
The shapes of the 4-cell mosaic graphics are based on an alternative
history in which Teletext adopted 4-cell graphics.  It's obviously
reasonable that such a world would still have separated graphics, so
let's have them.

This makes me thing that the method I've used for flagging separated
graphics is silly, but that's a story for another commit.
2020-03-28 21:35:01 +00:00
Ben Harris
7e8a47cfc5 Implement separated graphics as feature 'ss16'
While Unicode 13 added code points for 6-cell mosaic graphics, it
didn't specify any way to select separated vs contiguous graphics.
This differs fron ZVBI, which used differect code points for separated
and contiguous glyphs.  This means that separated graphics must be a
matter of style, which is consistent with the way that they're
selected by a control character in Teletext.

In OpenType, implement this as a stylistic set, 'ss16', that replaces
the contiguous glyphs with their separated counterparts.  I'm
reserving 'ss14' for the 4-cell equivalent.
2020-03-28 21:03:37 +00:00
Ben Harris
4821654490 Put Latin small caps at their proper Unicode code points
There are Unicode code points for most Latin small capital letters, so 
we may as well make our existing designs for them available under those 
code points.  The glyphs generated by the 'smcp' and 'c2sc' lookups are 
now aliases for the canonical Unicode versions.
2020-03-28 20:15:04 +00:00
Ben Harris
d5c6f9ec42 Use aliases to connect small cap glyphs to their Unicode equivalents 2020-03-28 17:36:20 +00:00
Ben Harris
7216af9189 Remove a stray space 2020-03-28 17:00:41 +00:00
Ben Harris
0264e16018 Make the 'c2sc' feature work like others
Now that we can have aliases, we can arrange that 'smcp' applied to
"a", and 'c2sc' applied to "A" give differently-named glyphs that have
the same appearance.  This means that something attempting to generate
Unicode from PostScript will be able to properly distinguish them.  It
also means that the SC flag can be removed and we can stop making
assumptions about case-mapping of glyph names.
2020-03-28 17:00:14 +00:00
Ben Harris
1dc4e2da16 Add a mechanism for making aliases of glyphs
This is done by making the new glyph contain only a reference to the
old one.  While it's possible to have multiple Unicode code points
reference the same glyph, that's rarely what you want because it's
useful to be able to map back from a glyph name to a code point, and
obviously that requires that the glyph have different names when
accessed through different code points.
2020-03-28 16:53:38 +00:00
Ben Harris
c8c26e41a3 Use 4-cell mosaic graphics to render block, lfblock, and rtblock
The results are the same, but since their Unicode code points are with
the other 4-cell characters, the source code it more intelligible.
2020-03-28 16:19:54 +00:00
Ben Harris
7c3dc41f9a Remove a few unused declarations spotted by GCC 2020-03-28 16:03:12 +00:00
Ben Harris
34e35a93b1 Move generation of uniXXXX names from runtime to compile time
It was getting complicated to ensure that everywhere that needed a
glyph name correctly generated them: simpler to have the preprocessor
generate them once.
2020-03-28 15:59:27 +00:00
Ben Harris
0bc46491d3 More efficient (but hacky) searching for glyphs by name
Now rather than linearly searching the list of glyphs, dolookup() can
do a binary search on a list of glyph names.  This is faster, but the
code is currently very ugly.
2020-03-28 12:37:14 +00:00
Ben Harris
1933bc167f Switch encoding from UnicodeBmp to UnicodeFull
This should have no effect on the OTF output, but it ensures that all
characters are properly encoded in BDF.  It also corrects a technical
invalidity in our SFD files.
2020-03-28 10:48:34 +00:00
Ben Harris
0a21eeaeff Remove the SC flag from D.saa5052 and L.saa5052
It didn't work properly anyway.
2020-03-28 10:17:31 +00:00
Ben Harris
31e3b18e11 Make the 'smcp' lookup work like the stylistic sets
The SC flag is no longer applied to lower-case letters.  Instead,
dolookups() automatically searches for suitably-names glyphs.
2020-03-28 10:05:35 +00:00
Ben Harris
2ba6e6fbdd Add Cyrillic ie grave and dze (U+0400, U+0405, U+0450, U+0455)
They're identical to Latin "e" grave and "s".
2020-03-01 12:28:05 +00:00
Ben Harris
1f9ea007dd Add the Greek letter yot (U+037F, U+03F3)
As far as I can see it's visually identical to the Latin 'j'.
2020-03-01 12:12:26 +00:00
Ben Harris
97e4fac0bd Fix a missing space in a comment 2020-03-01 11:48:16 +00:00
Ben Harris
27947e9d87 Add Greek spacing accents, U+0384 and U+0385 2020-03-01 11:38:58 +00:00
Ben Harris
8d99ef3655 Add dotless j 2019-12-14 14:59:17 +00:00
Ben Harris
75decb8817 A few extra glyphs with macrons. 2019-12-14 14:55:56 +00:00
Ben Harris
a21b5b758c All the remaining precomposed latin letters with diaeresis 2019-12-14 14:18:10 +00:00
Ben Harris
56c7d2e66d Add A / a with dot below
Somehowo I missed these in the last batch.
2019-12-14 00:44:09 +00:00
Ben Harris
d8a0fe6469 Add glyphs for a bunch of letters with dots below.
I discovered that Ubuntu has keyboard sequences for these, and they're 
easy to draw.
2019-12-13 18:39:45 +00:00
Ben Harris
15126cfddd Don't auto-hint mosaic graphics characters.
Suggested by Jason A.
2019-12-13 18:37:52 +00:00
Ben Harris
954f60b9e1 Add 4-cell mosaic graphics.
These follow the same approach as 6-cell graphics: the smoothing
algorithm is disabled and there's no margin between character cells.
This is necessary to ensure that "upblock" and "dnblock" harmonise
with "lfblock" and "rtblock", the latter two being unified with 6-cell
graphics and the former not.

I've filled in the rest of the 4-cell characters on the basis that an
alternate history in which Teletext used 4-cell rather than 6-cell
graphics is perfectly plausible and Bedstead may as well support it.
2019-01-20 11:10:24 +00:00
Ben Harris
a37c1240db Put mosaic graphics in their new home.
That's the U+1FB00 block.  Annoyingly, no gaps are left for the
characters unified elsewhere, so the character codes are slightly
unsystematic.
2019-01-20 00:54:32 +00:00
Ben Harris
4e4d1a5cd5 Convert "block", "lfblock" and "rtblock" to mosaic graphics.
In Unicode, these will be unified with 6-cell mosaic graphics, so we
need to use the mosaic graphics system for them.
2019-01-20 00:26:49 +00:00
Ben Harris
6bdb83305e A few interesting characters from U+1FBxx.
That's the forthcoming "Graphics for Legacy Computing" block that will
finally have an official encoding of teletext mosaic graphics.
2019-01-19 01:45:54 +00:00
Ben Harris
c78b95f6f0 Add Cyrillic letters necessary for Serbian.
That's dje, je, lje, nje, tshe, and dzhe.  Because I got an email from
Serbian Wikipedia.
2018-10-26 12:42:40 +01:00
Ben Harris
ae3be652a3 Bump version number to 002.000.
I can't think of anything else I need to do for it.
2018-04-25 22:18:05 +01:00
Ben Harris
829128680a Slight change to U+241B SYMBOL FOR ESCAPE.
The "C" is now more obviously a "C" and not a "(".
2018-04-07 00:13:52 +01:00
Ben Harris
480682f5f8 Rationalise widths of Bedstead variants.
They are all now sensible fractions of the standard width.

Extra Condensed has changed from 62/100 to 5/8.
Condensed has changed from 76/100 to 3/4.
Semi Condensed has changed from 88/100 to 7/8.
Extended has changed from 124/100 to 5/4.

This makes rather a lot of dimensions non-integer, but the only
significant ones are the "palt" width adjustments, and I think that's
an acceptable tradeoff for making the standard widths more sensible.
2018-04-06 23:51:56 +01:00
Ben Harris
7473a75d39 Turn XPIX into a double. 2018-04-06 23:26:33 +01:00
Ben Harris
d655ebfcb1 Convert a bunch of printfs to %g.
Along with casting arguments to (double), obviously.
2018-04-06 23:20:34 +01:00
Ben Harris
b86aa20400 When printfing dimensions, cast them to the right type first.
That way, if floating-point numbers turn up, they won't get
interpreted as ints and cause a horrid mess.
2018-04-06 23:07:28 +01:00
Ben Harris
8c6f94dd3c Move .notdef to the end of the list with the other unencoded glyphs. 2018-04-04 22:16:01 +01:00
Ben Harris
1006cc012b Consistently put a blank line before each Unicode block heading. 2018-04-04 22:15:27 +01:00
Ben Harris
df180db76b Move Shavian alphabet to its proper position in code-point order. 2018-04-04 22:14:52 +01:00
Ben Harris
463eeb6462 Add Marnanel Thurman to list of authors and update dates. 2018-04-04 22:14:31 +01:00