# Minimal example of Metafont file and how using it [closed]

I need create simple utf-8 characters font with 4 glyphs. characters = a,ą,ā,ȧ I would like to use it in normal latex roman font (mixing standard rm font and my).

Where is working minimal example of parameters font in metafont. *.mf file. How seting kerning between glyph and how defining acute over the glyph and create new glyph?

I foud some example but only for 'a' file test.tex

%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel}

\newfont{\letterbeta}{beta}
\newcommand{\literaa}{{\letterbeta a}}
\begin{document}
Czy nasz glif działa czy nie?{\Large Sprawdzimy \literaa\ tutaj} i tutaj \literaa.
%\small\tiny\big etc. in latex
\literaa\literaa
\end{document}


and file beta.mf

font_identifier := "fontusik";
mode_setup;

%cmchar "Litera a";
% Litera a lub cyfrowo 97
beginchar("a",11pt#,11pt#,0);
% Zmienne i koordynaty
y1=y2=y3=0; y4=y5=y6=h; x1=x4=0; x2=x5=w; x3=x6=2*w;
%not working?
%showmsg("h=", h/1mm );
% Definiujemy pióro
pickup pencircle xscaled 0.2w yscaled 0.4w rotated 45;
% Rysujemy linię
draw z1..z3..z6{z2-z6}..z5..{z4-z2}z4..cycle;
% showit;
penlabels(z1,z3,z4);
endchar;

bye.


Makefile:

test.dvi : test.tex
mf '\mode=ljfour; mode_setup; input beta.mf'
gftopk beta.600gf beta.600pk
pdflatex test.tex


How seting right space between chars, and chars uper 256

## closed as too broad by egreg, Stefan Pinnow, ChrisS, Ruben, TroySep 8 '17 at 14:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• latex today is complicated , and unicode char map and ligatures is complicated too ;-) I waiting for white knights , who create example and put them on github. – Marek Kaski Sep 7 '17 at 15:39
• metafont and pdflatex can not handle unicode fonts so it isn't clear what you mean by a "utf-8 characters font" . Most of the characters you show are above U+00FF so would need to be added (somewhere) in a custom 8-bit encoding. But it isn't clear why you need a font \usepackage[utf8]{inputenc} should already allow input of ą etc, and constructing a suitable representation for pdftex? – David Carlisle Sep 7 '17 at 16:30
• (1) If you simply want to use the characters a,ą,ā,ȧ, they are already available without you creating a new font. (2) If you do want to create a new font (that is: you want to change the shape of a, and the shape you desire is not available in any font that exists in the world), then you can use a modern font-creation tool like Fontforge or (if you like Metafont syntax) metatype1. (3) If you really want to use Metafont (note that it produces bitmap fonts), then please acknowledge the above points, and confirm that this is really what you want, and say why, and what you've tried. :-) – ShreevatsaR Sep 7 '17 at 18:06
• This is good questions, why on hold? – Marek Kaski Sep 8 '17 at 16:43
• \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \DeclareUnicodeCharacter{0227}{\.a} \begin{document} a, ą, ā, ȧ \par a, \k{a}, \={a}, \.{a} \end{document}  – Johannes_B Sep 9 '17 at 7:43