From will.adams at frycomm.com Sun Jun 25 15:37:44 2017 From: will.adams at frycomm.com (William Adams) Date: Sun, 25 Jun 2017 09:37:44 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? Message-ID: I've decided I really want to finally get started with METAFONT --- having a hard time getting started 'cause I'm not getting some of the program interactions, naming conventions, and so forth. It was my intent to start with the sample file from "Lessons learned from METAFONT" in _Digital Typography_ but I've been having a hard time just getting it transcribed accurately and getting started at running it. Does anyone have a cheat sheet which breaks down which program calls result in what files, which are need for what aspects of the design process? I guess that what needs to happen is we need to update _Making TeX Work_ to fill in for the "local guide" http://makingtexwork.sourceforge.net/mtw/ch11.html Basically, I have a _lot_ of drawings in a _lot_ of files for a typeface revival I'm working on --- it's optically-sized, and I only have a couple of complete sets (from memory, 28 and 72 pt.) and only one pair of letters where I have all the sizes (cap and lowercase N/n) so what I want to do is work up a system which allows me to: - design letters as strokes in METAFONT w/ an adjustment for optical size (and maybe some others) - proof these letters on-screen easily / automatically / at least somewhat interactively - overlay the proof letters w/ the outlines which I do have - get a nice outline from the METAFONT design which I can then use to make an Opentype font I've been reading through everything I can find on this for a very long time, but every time I go to try something, something doesn't work / breaks, and I'm never sure if it's my system, my effort at running the command, a transcription error, or something. It doesn't help that I am now reduced to a small Windows 10 tablet as my main computer --- I've been trying to get MikTeX updated to run all the METAFONT programs, but would be open to some other distribution if it would be better supported. (Linux isn't really an option, since I prefer to write using a stylus rather than type at a keyboard). Any notes / sample files / links anyone has would be welcome. William -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.adams at frycomm.com Sun Jun 25 16:23:02 2017 From: will.adams at frycomm.com (William Adams) Date: Sun, 25 Jun 2017 10:23:02 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: Managed to get a bit farther --- using the Making TeX Work chapter made the file "eight.mf" which mf would process w/o error (but I only got a .2602gf file out of it, not tfm). mf '\input eight.mf' This file did process correctly using gftodvi, resulting in a dvi which would open (previous efforts were 0 bytes in length) gftodvi eight.2602gf But, when I open it, the character is many times larger than it ought to be, over-flowing the page --- how do I get it to be limited to the page in question. Is there some better way to do this? As I noted, what I really want is to overlay the proof file and a vector image (though being able to also overlay a pixel image would be nice for some instances). William On Sun, Jun 25, 2017 at 9:37 AM, William Adams wrote: > I've decided I really want to finally get started with METAFONT --- having > a hard time getting started 'cause I'm not getting some of the program > interactions, naming conventions, and so forth. > > It was my intent to start with the sample file from "Lessons learned from > METAFONT" in _Digital Typography_ but I've been having a hard time just > getting it transcribed accurately and getting started at running it. > > Does anyone have a cheat sheet which breaks down which program calls > result in what files, which are need for what aspects of the design process? > > I guess that what needs to happen is we need to update _Making TeX Work_ > to fill in for the "local guide" http://makingtexwork. > sourceforge.net/mtw/ch11.html > > Basically, I have a _lot_ of drawings in a _lot_ of files for a typeface > revival I'm working on --- it's optically-sized, and I only have a couple > of complete sets (from memory, 28 and 72 pt.) and only one pair of letters > where I have all the sizes (cap and lowercase N/n) so what I want to do is > work up a system which allows me to: > > - design letters as strokes in METAFONT w/ an adjustment for optical size > (and maybe some others) > - proof these letters on-screen easily / automatically / at least > somewhat interactively > - overlay the proof letters w/ the outlines which I do have > - get a nice outline from the METAFONT design which I can then use to > make an Opentype font > > I've been reading through everything I can find on this for a very long > time, but every time I go to try something, something doesn't work / > breaks, and I'm never sure if it's my system, my effort at running the > command, a transcription error, or something. > > It doesn't help that I am now reduced to a small Windows 10 tablet as my > main computer --- I've been trying to get MikTeX updated to run all the > METAFONT programs, but would be open to some other distribution if it would > be better supported. (Linux isn't really an option, since I prefer to write > using a stylus rather than type at a keyboard). > > Any notes / sample files / links anyone has would be welcome. > > William > -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.adams at frycomm.com Mon Jun 26 16:07:55 2017 From: will.adams at frycomm.com (William Adams) Date: Mon, 26 Jun 2017 10:07:55 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: Also asked this on tex.stackexchange --- my apologies for folks who see it twice. On Sun, Jun 25, 2017 at 10:23 AM, William Adams wrote: > Managed to get a bit farther --- using the Making TeX Work chapter made > the file "eight.mf" which mf would process w/o error (but I only got a > .2602gf file out of it, not tfm). > > mf '\input eight.mf' > > This file did process correctly using gftodvi, resulting in a dvi which > would open (previous efforts were 0 bytes in length) > > gftodvi eight.2602gf > > But, when I open it, the character is many times larger than it ought to > be, over-flowing the page --- how do I get it to be limited to the page in > question. > > Is there some better way to do this? As I noted, what I really want is to > overlay the proof file and a vector image (though being able to also > overlay a pixel image would be nice for some instances). > > William > > > On Sun, Jun 25, 2017 at 9:37 AM, William Adams > wrote: > >> I've decided I really want to finally get started with METAFONT --- >> having a hard time getting started 'cause I'm not getting some of the >> program interactions, naming conventions, and so forth. >> >> It was my intent to start with the sample file from "Lessons learned from >> METAFONT" in _Digital Typography_ but I've been having a hard time just >> getting it transcribed accurately and getting started at running it. >> >> Does anyone have a cheat sheet which breaks down which program calls >> result in what files, which are need for what aspects of the design process? >> >> I guess that what needs to happen is we need to update _Making TeX Work_ >> to fill in for the "local guide" http://makingtexwork.sourcefor >> ge.net/mtw/ch11.html >> >> Basically, I have a _lot_ of drawings in a _lot_ of files for a typeface >> revival I'm working on --- it's optically-sized, and I only have a couple >> of complete sets (from memory, 28 and 72 pt.) and only one pair of letters >> where I have all the sizes (cap and lowercase N/n) so what I want to do is >> work up a system which allows me to: >> >> - design letters as strokes in METAFONT w/ an adjustment for optical >> size (and maybe some others) >> - proof these letters on-screen easily / automatically / at least >> somewhat interactively >> - overlay the proof letters w/ the outlines which I do have >> - get a nice outline from the METAFONT design which I can then use to >> make an Opentype font >> >> I've been reading through everything I can find on this for a very long >> time, but every time I go to try something, something doesn't work / >> breaks, and I'm never sure if it's my system, my effort at running the >> command, a transcription error, or something. >> >> It doesn't help that I am now reduced to a small Windows 10 tablet as my >> main computer --- I've been trying to get MikTeX updated to run all the >> METAFONT programs, but would be open to some other distribution if it would >> be better supported. (Linux isn't really an option, since I prefer to write >> using a stylus rather than type at a keyboard). >> >> Any notes / sample files / links anyone has would be welcome. >> >> William >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luigi.scarso at gmail.com Mon Jun 26 19:46:01 2017 From: luigi.scarso at gmail.com (luigi scarso) Date: Mon, 26 Jun 2017 19:46:01 +0200 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: >> On Sun, Jun 25, 2017 at 9:37 AM, William Adams >> wrote: >>> >>> - design letters as strokes in METAFONT w/ an adjustment for optical >>> size (and maybe some others) >>> - proof these letters on-screen easily / automatically / at least >>> somewhat interactively >>> - overlay the proof letters w/ the outlines which I do have >>> - get a nice outline from the METAFONT design which I can then use to >>> make an Opentype font Perhaps you can find https://www.tug.org/TUGboat/tb32-2/tb101scarso.pdf interesting -- luigi From dave at lab6.com Mon Jun 26 21:51:52 2017 From: dave at lab6.com (Dave Crossland) Date: Mon, 26 Jun 2017 15:51:52 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: http://metafont.tutorial.free.fr also a great read The font sourcecode made for http://metaflop.com are recent and good to read too -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.adams at frycomm.com Wed Jun 28 05:56:15 2017 From: will.adams at frycomm.com (William Adams) Date: Tue, 27 Jun 2017 23:56:15 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: Thanks for the resources! Added the following to my tex.stackexchange query: Okay, given a `METAFONT` eight.mf: mode_setup; u# := 2mm#; define_pixels(u); beginchar("A", 8u#, 9u#, 5u#); z1 = ( 0u, 0u); z2 = ( 8u, 0u); z3 = ( 1u, 8u); z4 = ( 7u, 8u); pickup pencircle scaled 1u#; draw z4 .. z1 .. z2 .. z3 .. cycle; pickup pencircle scaled 3u#; drawdot z1; drawdot z2; drawdot z3; drawdot z4; endchar; \end we process it using mf eight.mf and get the file eight.2602gf we then run gftodvi eight.2602gf which gets us eight.dvi, but when we open that we see: [![eight.dvi screengrab][1]][1] [1]: https://i.stack.imgur.com/JrRQI.png Ideally I'd like a solution which makes use of lualatex and PDF --- I'd like to be able to open up a metafont file in a text editor, tweak / edit it, then compile the project and instantly see it overlaid on a pixel image (and possibly surprinted by a vector PDF. I think it's something basic and simple which I'm missing or failing to communicate. William -------------- next part -------------- An HTML attachment was scrubbed... URL: From luigi.scarso at gmail.com Wed Jun 28 10:13:17 2017 From: luigi.scarso at gmail.com (luigi scarso) Date: Wed, 28 Jun 2017 10:13:17 +0200 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: On Wed, Jun 28, 2017 at 5:56 AM, William Adams wrote: > Thanks for the resources! > > > Added the following to my tex.stackexchange query: > > Okay, given a `METAFONT` eight.mf: > mode_setup; > u# := 2mm#; > define_pixels(u); > > beginchar("A", 8u#, 9u#, 5u#); > z1 = ( 0u, 0u); > z2 = ( 8u, 0u); > z3 = ( 1u, 8u); > z4 = ( 7u, 8u); > pickup pencircle scaled 1u#; > draw z4 .. z1 .. z2 .. z3 .. cycle; > pickup pencircle scaled 3u#; > drawdot z1; > drawdot z2; > drawdot z3; > drawdot z4; > endchar; > > \end > we process it using > mf eight.mf > and get the file eight.2602gf > we then run > gftodvi eight.2602gf > which gets us eight.dvi, but when we open that we see: > [![eight.dvi screengrab][1]][1] > > [1]: https://i.stack.imgur.com/JrRQI.png > Ideally I'd like a solution which makes use of lualatex and PDF --- I'd like > to be able to open up a metafont file in a text editor, tweak / edit it, > then compile the project and instantly see it overlaid on a pixel image (and > possibly surprinted by a vector PDF. > > I think it's something basic and simple which I'm missing or failing to > communicate. GF fonts are bitmap fonts, you can inspect them with gftype -images It's quite easy with lua to translate the output of gftype -images into a metapost bitmap graphics, but also it's not hard to write a gftype program in lua. In any case, The METAFONTbook ans a recent texlive (ie the latest 2017) are almost a must; you can find more info on gftype with texdoc -l gftype In principle, wiht luatex it's possible to use gf (or pk) font files directly without going to dvi: it'a a matter of a proper encoding, and right resolution. There is an example here, subsection 3 http://www.guitex.org/home/images/ArsTeXnica/AT021/latino-article.pdf Of course, in most cases the same results can be obtained with Metapost, -- luigi From will.adams at frycomm.com Thu Jun 29 05:01:22 2017 From: will.adams at frycomm.com (William Adams) Date: Wed, 28 Jun 2017 23:01:22 -0400 Subject: [metapost] Anyone have notes / test files for METAFONT? In-Reply-To: References: Message-ID: Thanks! Picked up a copy of the Millenium Edition of _The METAFONTbook_ in preparation for this, made one pass through reading it, and need to find the time and energy for a re-read and to try to do the exercises. William On Wed, Jun 28, 2017 at 4:13 AM, luigi scarso wrote: > On Wed, Jun 28, 2017 at 5:56 AM, William Adams > wrote: > > Thanks for the resources! > > > > > > Added the following to my tex.stackexchange query: > > > > Okay, given a `METAFONT` eight.mf: > > mode_setup; > > u# := 2mm#; > > define_pixels(u); > > > > beginchar("A", 8u#, 9u#, 5u#); > > z1 = ( 0u, 0u); > > z2 = ( 8u, 0u); > > z3 = ( 1u, 8u); > > z4 = ( 7u, 8u); > > pickup pencircle scaled 1u#; > > draw z4 .. z1 .. z2 .. z3 .. cycle; > > pickup pencircle scaled 3u#; > > drawdot z1; > > drawdot z2; > > drawdot z3; > > drawdot z4; > > endchar; > > > > \end > > we process it using > > mf eight.mf > > and get the file eight.2602gf > > we then run > > gftodvi eight.2602gf > > which gets us eight.dvi, but when we open that we see: > > [![eight.dvi screengrab][1]][1] > > > > [1]: https://i.stack.imgur.com/JrRQI.png > > Ideally I'd like a solution which makes use of lualatex and PDF --- I'd > like > > to be able to open up a metafont file in a text editor, tweak / edit it, > > then compile the project and instantly see it overlaid on a pixel image > (and > > possibly surprinted by a vector PDF. > > > > I think it's something basic and simple which I'm missing or failing to > > communicate. > > > GF fonts are bitmap fonts, you can inspect them with gftype -images > It's quite easy with lua to translate the output of gftype -images > into a metapost bitmap > graphics, but also it's not hard to write a gftype program in lua. > > In any case, The METAFONTbook ans a recent texlive (ie the latest > 2017) are almost a must; > you can find more info on gftype with texdoc -l gftype > > In principle, wiht luatex it's possible to use gf (or pk) font files > directly without going to dvi: > it'a a matter of a proper encoding, and right resolution. > There is an example here, subsection 3 > http://www.guitex.org/home/images/ArsTeXnica/AT021/latino-article.pdf > Of course, in most cases the same results can be obtained with Metapost, > > > -- > luigi > -------------- next part -------------- An HTML attachment was scrubbed... URL: