67 Commits

Author SHA1 Message Date
Ben Harris
b893d49beb Do not build bedstead.mjs as part of a release
I think it would be unwise to make the editor usable on Bedstead's Web
page.  This avoids the danger of Bedstead's Web page turning into a
regulated user-to-user service under the Online Safety Act 2023, with
all the paperwork that would entail.

Specifically, if there were an editor on Bedstead's Web page then
users could use it to create glyph designs.  That would, indeed, be
the whole point.  They might also send those designs to me for
incorporation into Bedstead.  But if I accepted any of those designs,
then "content generated directly on the service by a user" might "be
encountered by another user, or other users, of the service" (OSA
s3(1)), making the site a user-to-user service.

Ofcom take the position that being hosted on a .uk domain name is
enough to give a service "links to the UK", and none of the exemptions
cover Bedstead's Web page.  So if the page were a user-to-user
service, it would be a regulated one.

Being a regulated user-to-user service brings requirements for
risk-assessment, record-keeping, and terms of service.  These might be
reasonable for a service of any significant size, but it's not worth
the effort for something that I expect will get me a few glyphs at
most.  And there seem to be moves afoot to require age assurance on
all regulated user-to-user services, which would be particularly
annoying.

The OSA is arranged such that even if no new content can be created on
a service, the continuing presence of user-generated content on a
service causes it to be a user-to-user service.  So ever accepting a
glyph designed on the Web page would permanently make it into a
user-to-user service.  Thus it's important that I shouldn't do that.
2026-01-24 19:33:21 +00:00
Ben Harris
922af33a25 webstead: use .mjs for JavaSript module
This means that emcc automatically uses the correct mode, and seems
slightly more correct to me.
2026-01-13 21:42:18 +00:00
Ben Harris
0e23fc6658 Makefile cleanups for webstead
Add -sINCOMING_MODULE_JS_API because in newer Emscripten -sSTRICT
empties it.  Remove -sMODULARIZE because -sEXPORT_ES6 implies it.  Add
-O2 since the compiled code will probably be run more than once.  Pass
standard compiler flags to emcc.  Build bedstead.js in all-web, and
remove it in clean.
2026-01-13 21:42:18 +00:00
Ben Harris
861c4749e6 Minimal build system and test page for Bedstead-in-WASM
Just allows for typing a command line and seeing the output.
2026-01-13 21:42:18 +00:00
Ben Harris
f921f1ec6f Add some warning flags to the C compiler
I've chosen ones under which bedstead.c is currently clean, at least
using the versions of GCC and Clang currently in Debian stable.
2024-12-03 13:58:25 +00:00
Ben Harris
03b881a394 Set -dNOSAFER when running .bdf.ps programs
Ghostscript 10.03.1 and later disable the "makeimagedevice" operator
when running under -dSAFER.  Even --permit-devices='*' isn't enough to
get it back.  The release notes say that makeimagedevice has been
removed entirely, but that seems not to be correct.
2024-11-27 21:01:25 +00:00
Ben Harris
8070fb1300 Stop using %stdout for writing BDF files
Instead, pass the destination filename to the bdf.ps program and have it
open the file itself.  This avoids capturing Ghostscript's own
diagnostics in the output file.
2024-11-27 10:51:38 +00:00
Ben Harris
be223879a1 Pass --no-recalc-timestamp to TTX
Without that, it updates the "modified" field in the 'head' table,
which makes builds unreproducible.
2024-11-16 11:53:04 +00:00
Ben Harris
650103b465 Extract version number from C file, not nonexistent SFD 2024-11-16 11:53:04 +00:00
Ben Harris
c93160c507 Add .DELETE_ON_ERROR target to Makefile
That ensures that output files of a rule get properly deleted if the
recipe fails, which is almost always correct.
2024-11-14 23:31:36 +00:00
Ben Harris
39d226c820 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.
2024-11-14 22:27:18 +00:00
Ben Harris
a625952522 Fontmap is required by .bdf.ps files 2024-11-10 09:30:35 +00:00
Ben Harris
a89d0efedd 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.
2024-11-10 09:30:35 +00:00
Ben Harris
4b972f1bee Rough Makefile bits for new BDF generation 2024-11-10 09:29:36 +00:00
Ben Harris
77efacaa0a Add some SPDX-License-Identifier headers
In places where they don't get in the way.
2024-10-24 00:01:26 +01:00
Ben Harris
8d58b7485c Add a HACKING file that's a guide to the source code
Suggested by Ian Jackson.
2024-10-12 16:28:35 +01:00
Ben Harris
f290a93470 Correct dependencies for all-web 2024-09-24 14:26:49 +01:00
Ben Harris
2a4fec6c17 Add an icon to the Web page
I generate various sizes because the 16-pixel version looks better than
the scaled-down larger versions.
2024-08-17 00:11:11 +01:00
Ben Harris
9e018799ce Generate sample images in colour to match Web page 2024-08-17 00:11:11 +01:00
Ben Harris
4a515117e3 Add rom.ps to distribution zipfiles 2024-06-24 23:24:55 +01:00
Ben Harris
c0f9d6e261 Include CONTRIBUTING in the distribution zip files 2024-06-13 22:37:40 +01:00
Ben Harris
f76da21590 Split images for Web page into a new make target
"make all" shouldn't depend on things that aren't in the source
distribution, and now it doesn't.  The images that are only used for the
Web site are now generated by a separate "all-web" target.  I'm not sure
this is the right long-term approach, but it's good enough for now.
2021-11-05 00:20:46 +00:00
Ben Harris
9236b2b46e Add df.ps to DISTFILES
It's needed to build the *-df.png tilesets for Dwarf Fortress, so
obviously it should be part of the source distribution.
2021-11-05 00:07:52 +00:00
Ben Harris
58eebbf5f8 Makefile bits for bold faces 2021-10-16 20:06:33 +01:00
Ben Harris
7bde2d18ab Minimal Makefile bits for making Bedstead Bold 2021-10-16 20:06:33 +01:00
Ben Harris
77cb8d9d8f Add the Fontmap file to the source distribution
It's necessary to build the glyph complement, and I think the source
distribution should include everything necessary to build the binaries
in it.  It doesn't need to include things that are only used for the
Web site, though.
2021-10-10 21:21:35 +01:00
Ben Harris
d8650d1063 Add "install-local" rule to Makefile
It installs into $HOME/.fonts, which is useful to me at least.
2020-05-22 23:05:18 +01:00
Ben Harris
885cfc5560 Switch to using text for the Web page title
A typical Web browser support Web Fonts these days, so there's no need 
to use an image for the purpose.  The other images remain for now since 
they're not really representing text.
2020-03-22 12:59:51 +00:00
Ben Harris
d2a749c465 Add NEWS to distfiles. 2018-04-25 22:21:54 +01:00
Ben Harris
0f9d379316 Make any rule that uses Ghostscript depend on the Fontmap. 2018-04-09 22:27:24 +01:00
Ben Harris
6932fab2b4 Correctly remove bedstead-complement.ps when making clean.
I forgot to update the rule for the new filename.
2018-04-09 22:14:52 +01:00
Ben Harris
8ff0c0634b Remove everything relating to PFA and AFM files.
Nothing in the build system uses them now, and I'd already stopped
distributing them.
2018-04-09 22:14:10 +01:00
Ben Harris
4cd84ee82c Don't include SFD files in distribution.
They're not really finished products.  Also I don't think I should
encourage people to load random SFDs since FontForge will apparently
happily execute Python code it finds in them.
2018-04-09 22:12:09 +01:00
Ben Harris
f8acc16830 Rename glyph complement PDF and add it to the distribution.
"bedstead" now appears in the name.
2018-04-09 21:48:51 +01:00
Ben Harris
665a6dc28b Mention stroked fonts on Web page (with a sample). 2018-04-04 22:17:06 +01:00
Ben Harris
4b4dac09bf Add a temporary makefile target for experimental fonts. 2017-11-27 00:09:28 +00:00
Ben Harris
9a93b07e13 Makefile machinery for stroked fonts. 2017-08-12 09:36:43 +01:00
Ben Harris
a9d3d9660a Remove explicit mention of Dwarf Fortress files from "all" target.
They're pulled in by $(DISTFILES) anyway.
2017-08-08 00:55:54 +01:00
Ben Harris
1abfbc4307 Don't generate BDF for non-default fonts.
The other widths will generate terrible bitmaps, so just don't bother.
2017-08-08 00:37:06 +01:00
Ben Harris
8cb534f2f0 Don't generate PFA and AFM files by default, and don't ship them.
They were only built because I didn't know how to make Ghostscript 
use OTF files directly.  Now that I do, there's no need to keep 
them, so dropping them for 002.000 makes sense.
2017-08-08 00:29:47 +01:00
Ben Harris
beda7a12f3 Fix FontForge Makefile rules to work properly.
When generating secondary targets, they still need to pass the name of
the primary target to FontForge.
2017-08-06 23:12:09 +01:00
Ben Harris
dd7d33d90d Add *.afm to the list of things cleaned by "make clean". 2017-08-06 22:59:48 +01:00
Ben Harris
fba832ba73 Use pd2pdf in place of gs -sDEVICE=pdfwrite.
This is simpler and means that .setpdfwrite gets called automatically.
2017-07-31 22:39:43 +01:00
Ben Harris
3dec694bd2 Feed OTF fonts to GhostScript via Fontmap rather than PFA on command-line.
This should make it practical to provide metadata in comments for (e.g.) 
PDF generation.
2017-07-31 19:27:14 +01:00
Ben Harris
034e78153b Don't list "bedstead" as a prereq for "make dist".
The recipe doesn't use it.
2017-07-31 16:34:22 +01:00
Ben Harris
c5ebead2cd Use the correct option to get a glyph complement.
It didn't matter before because bedstead.c would almost always produce
a glyph complement.
2017-07-31 16:29:45 +01:00
Ben Harris
2e8a4e90c9 Beginnings of mechanisms for generating a glyph complement PDF. 2017-07-22 21:44:12 +01:00
Ben Harris
6062313421 Comprehensive rework of widths. Now there are six.
The names of the widths now track those in the OpenType 'OS/2' table, so 
the former condensed and semicondensed are now ultra-condensed and 
extra-condensed, and there are new condensed and semi-condensed widths 
to fill the gaps.  Also, the fonts are named more consistently with 
Adobe's practice: "Bedstead Semi Condensed" and so forth.

The new Bedstead Condensed makes a pretty decent terminal font, which is 
a nice side-effect.
2017-07-15 23:22:14 +01:00
Ben Harris
247547bf40 Web page update for condensed fonts. 2017-07-03 00:43:22 +01:00
Ben Harris
fd5488c1a0 Half-width versions of fonts.
These are intended to be used as double-height characters.
2017-07-02 17:56:24 +01:00