Overview of font conversion from TTF (or OTF) fonts to Medley DISPLAYFONT via BDF #2130
Replies: 4 comments 1 reply
-
Here are some zip files of some fonts I converted, most of them using the procedure above, and mostly in 10,12,15 point sizes. Enjoy! Edit: I replaced the .zip files as they included multiple copies from my testing of the process. I thought that I had cleaned up before the last run through. |
Beta Was this translation helpful? Give feedback.
-
It works: One thing to note is the toplevel directories of your .zip files named after font families should not be copied to the selected Medley font directory as is. Instead, only the contained subdirectories should be copied to the font directory. |
Beta Was this translation helpful? Give feedback.
-
Attached .zips of DISPLAYFONT files were replaced again (see comment above). Sorry |
Beta Was this translation helpful? Give feedback.
-
re fonts:
The "fonts" hierarchy needs some attention. The fonts we have were
haphazardly curated from a variety of sources. In the repo ${MEDLEY}/fonts
there are:
adobe -- ? postscript widths? what are these?
altofonts -- Are these used by anything? They weren't part of a venue/envos
release?
big -- these are fake fonts that I found looking for bigger fonts only to
discover that they were just relabelled fonts for smaller sizes
displayfonts -- Envos moved to a different font organization, releasing
fonts organized into sub-categories in order to optimize loading fonts from
floppies.
other -- some other fonts that I didn't know where to put. Includes
Dancer, Sigma, and Titan.
https://LarryMasinter.net https://interlisp.org
…On Tue, Apr 29, 2025 at 12:58 PM Matt Heffron ***@***.***> wrote:
How to convert ttf (or otf) font file to bdf and then displayfont.
Prerequisite
Install otf2bdf by the method appropriate to your environment.
Save the convert.txt
<https://github.com/user-attachments/files/19966613/convert.txt> to the
same directory, rename it to convert.sh, and mark it as executable.
TTF (OTF) to BDF
Get the ttf (otf) file.
In bash (maybe other shells) invoke convert.sh:
./convert.sh pixel-size weight input-file-name output-file-name
- pixel-size : (integer) is the *desired* size of the bdf file. (The
conversion *may* round that size. Some where I requested 14 got 15.)
- weight : override the weight in the file (e.g., Bold, Medium) (Some
ttf internally have Book but should be Medium)
- input-file-name : the ttf or otf input file (I didn't try with any
path; that's why to copy convert.sh to the same directory.)
- output-file-name : the basename of the output (bdf) file. *This is
optional.* If not provided, it will be the basename of the
input-file-name.
The actual bdf file generated will be the provided (or derived)
output-file-name, a hyphen, the pixel-size, then .bdf.
(The pixel-size used here is the argument provided. It isn't adjusted for
the rounding that may occur, as noted above. You may want to rename those
bdf files to the actual converted size.)
BDF to Medley DISPLAYFONT
After you have generated the bdf files, start Medley full sysout.
In the exec enter:
(IL:FILESLOAD IL:READ-BDF)
Connect to the directory which contains the bdf files.
Decide where you want the DISPLAYFONT files to be located. It recommended
that this *not* be located in the MEDLEYDIR hierarchy, so that any
updating of Medley doesn't accidentally affect these.
Put the path to that location into IL:DISPLAYFONTDIRECTORIES system
variable.
For each bdf file to convert:
(CL:LET ((FONT (BDF:READ-BDF "the bdf file name including the .bdf")))
(BDF:WRITE-BDF-TO-DISPLAYFONT-FILES FONT "the destination directory"))
The DISPLAYFONT files will be written as the *converted* size, which may
have been rounded from the specified size, as noted above. The name of
those DISPLAYFONT files will reflect that.
That's it! You should be able to use IL:FONTCREATE to load the
IL:FONTDESCRIPTOR; and TEdit should be able to use these new fonts.
*NOTES*
- These are DISPLAY fonts, only. Currently, there is no mechanism for
using these in making a hardcopy file (e.g., PostScript or PDF).
- I used the *static* ttf files for the regular, bold, italic, and
bold italic faces. I didn't see how to generate those from a *variable*
font description file.
*There may be better ways to do this, but this is what I did that
worked!
—
Reply to this email directly, view it on GitHub
<#2130>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIQTK3FV6BVVSTPGEZDX2D237KWVAVCNFSM6AAAAAB4D4TSKKVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGI3DCOBZGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to convert ttf (or otf) font file to bdf and then displayfont.
Prerequisite
Install
otf2bdf
by the method appropriate to your environment.Save the convert.txt to the same directory, rename it to
convert.sh
, and mark it as executable.TTF (OTF) to BDF
Get the ttf (otf) file.
In bash (maybe other shells) invoke
convert.sh
:./convert.sh pixel-size weight input-file-name output-file-name
pixel-size
: (integer) is the desired size of the bdf file. (The conversion may round that size. Some where I requested 14 got 15.)weight
: override the weight in the file (e.g.,Bold
,Medium
) (Some ttf internally haveBook
but should beMedium
)input-file-name
: the ttf or otf input file (I didn't try with any path; that's why to copyconvert.sh
to the same directory.)output-file-name
: the basename of the output (bdf) file. This is optional. If not provided, it will be the basename of theinput-file-name
.The actual bdf file generated will be the provided (or derived)
output-file-name
, a hyphen, thepixel-size
, then.bdf
.(The
pixel-size
used here is the argument provided. It isn't adjusted for the rounding that may occur, as noted above. You may want to rename those bdf files to the actual converted size.)BDF to Medley DISPLAYFONT
After you have generated the bdf files, start Medley full sysout.
In the exec enter:
(IL:FILESLOAD IL:READ-BDF)
Connect to the directory which contains the bdf files.
Decide where you want the
DISPLAYFONT
files to be located. It recommended that this not be located in the MEDLEYDIR hierarchy, so that any updating of Medley doesn't accidentally affect these.Put the path to that location into
IL:DISPLAYFONTDIRECTORIES
system variable.For each bdf file to convert:
The DISPLAYFONT files will be written as the converted size, which may have been rounded from the specified size, as noted above. The name of those
DISPLAYFONT
files will reflect that.That's it! You should be able to use
IL:FONTCREATE
to load theIL:FONTDESCRIPTOR
; and TEdit should be able to use these new fonts.NOTES
DISPLAY
fonts, only. Currently, there is no mechanism for using these in making a hardcopy file (e.g., PostScript or PDF).Beta Was this translation helpful? Give feedback.
All reactions