1

Using tex4ht in combination with the igo package gives some error messages. The igo package can be found on CTAN.

Step 1: I have generated for test purposes igobl10.mf and igowh10.mf using the original mf-files from the igo package which generates the digits 0 to 9.

igobl10.mf:

font_identifier:="IGOBL10"; font_size 10pt#;

size#:=10pt#;
line_thickness#:=.04size#;
border_line_thickness#:=.1size#;

%%% 

dig_h#:=63/100size#;
dig_w#:=4/10size#;
dig_pen#:=1/10size#;

%%%% input igoblacki

mode_setup;

define_pixels(size);
define_pixels(line_thickness,border_line_thickness);
define_pixels(dig_h,dig_w,dig_pen);

picture digit[];
picture black_circle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

def digit_zero =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; y1=.5dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=dig_w; y3=.5dig_h;
  x4=.5dig_w; bot y4=0;
  draw z1...z2...z3...z4...cycle;
  digit[0] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_one =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  x1=.5dig_w; bot y1=0;
  x2=.5dig_w; top y2=dig_h;
  draw z1--z2;
  digit[1] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_two =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; y1=.75dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=.8dig_w; y3=.9dig_h;
  lft x4=0; bot y4=0;
  draw z1{up}...z2...z3..{(-.8dig_w,-dig_h)}z4;
  z5=z4;
  rt x6=dig_w; bot y6=0;
  draw z5--z6;
  digit[2] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_three =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=.08dig_w; y1=.8dig_h;
  x2=.5dig_w; top y2=dig_h; 
  rt x3=.92dig_w; y3=y1;
  z4=(.5dig_w,.52dig_h);
  rt x5=dig_w; y5=.2dig_h;
  x6=.65dig_w; bot y6=0;
  lft x7=0; y7=y5;
  draw z1{up}..z2..z3..{left}z4{right}..z5..z6...{up}z7;
  digit[3] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_four =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  x1=.75dig_w; bot y1=0;
  x2=x1; top y2=dig_h;
  lft x3=0; y3=.3dig_h;
  rt x4=dig_w; y4=y3;
  draw z1--z2--z3--z4;
  digit[4] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_five =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  rt x1=.95dig_w; top y1=dig_h;
  lft x2=.05dig_w; y2=y1;
  lft x3=0; y3=.45dig_h;
  z4=(.5dig_w,.6dig_h);
  rt x5=dig_w; y5=.3dig_h;
  x6=.65dig_w; bot y6=0;
  lft x7=0; y7=.15dig_h;
  draw z1--z2--z3{up}..z4..z5..z6...{up}z7;
  digit[5] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_six =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  rt x1=dig_w; y1=.8dig_h;
  x2=.45dig_w; top y2=dig_h;
  lft x3=0; y3=.5dig_h;
  x4=.5dig_w; bot y4=0;
  rt x5=dig_w; y5=.3dig_h;
  z6=(.53dig_w,.55dig_h);
  z7=(.03dig_w+.6dig_pen,.25dig_h);
  draw z1{up}...z2...z3...z4...z5...{left}z6{left}...{(1,-10)}z7;
  digit[6] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_seven =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; top y1=dig_h;
  rt x2=dig_w; y2=y1;
  lft x3=.2dig_w; bot y3=0;
  draw z1--z2--z3;
  digit[7] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_eight =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=.08dig_w; y1=.75dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=.92dig_w; y3=y1;
  z4=(.5dig_w,.55dig_h);
  rt x5=dig_w; y5=.25dig_h;
  x6=.5dig_w; bot y6=0;
  lft x7=0; y7=y5;
  draw z1...z2...z3...z4...cycle; 
  draw z4...z5...z6...z7...cycle;
  digit[8] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_nine =
  currentpicture := nullpicture;
  currentpicture := digit[6] rotated 180;
  digit[9] := currentpicture shifted (dig_w,dig_h);
  clearxy; clearit; clearpen;
enddef;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

digit_zero; digit_one; digit_two; digit_three; digit_four;
digit_five; digit_six; digit_seven; digit_eight; digit_nine;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

beginchar(0,24/22size#,23/22size#,1/22size#); "pion czarny";
  pickup pencircle scaled line_thickness;
  lft x1=1/24w; y1=11/24w;
  rt x2=23/24w; y2=11/24w;
  filldraw z1..z2..cycle;
  black_circle := currentpicture;
showit;
endchar;

% stop"";

beginchar(1,24/22size#,23/22size#,1/22size#); "pion czarny z 1";
  currentpicture := black_circle 
       - digit[1] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(2,24/22size#,23/22size#,1/22size#); "pion czarny z 2";
  currentpicture := black_circle 
       - digit[2] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(3,24/22size#,23/22size#,1/22size#); "pion czarny z 3";
  currentpicture := black_circle 
       - digit[3] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(4,24/22size#,23/22size#,1/22size#); "pion czarny z 4";
  currentpicture := black_circle 
       - digit[4] shifted (.5w-.6dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(5,24/22size#,23/22size#,1/22size#); "pion czarny z 5";
  currentpicture := black_circle 
       - digit[5] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(6,24/22size#,23/22size#,1/22size#); "pion czarny z 6";
  currentpicture := black_circle 
       - digit[6] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(7,24/22size#,23/22size#,1/22size#); "pion czarny z 7";
  currentpicture := black_circle 
       - digit[7] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(8,24/22size#,23/22size#,1/22size#); "pion czarny z 8";
  currentpicture := black_circle 
       - digit[8] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(9,24/22size#,23/22size#,1/22size#); "pion czarny z 9";
  currentpicture := black_circle 
       - digit[9] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

end;

igowh10.mf :

font_identifier:="IGOWH10"; font_size 10pt#;

size#:=10pt#;
line_thickness#:=.04size#;
border_line_thickness#:=.1size#;

%%% 

dig_h#:=63/100size#;
dig_w#:=4/10size#;
dig_pen#:=1/10size#; 

%%% input igowhitei

mode_setup;

define_pixels(size);
define_pixels(line_thickness,border_line_thickness);
define_pixels(dig_h,dig_w,dig_pen);

picture digit[];
picture white_circle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

def digit_zero =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; y1=.5dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=dig_w; y3=.5dig_h;
  x4=.5dig_w; bot y4=0;
  draw z1...z2...z3...z4...cycle;
  digit[0] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_one =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  x1=.5dig_w; bot y1=0;
  x2=.5dig_w; top y2=dig_h;
  draw z1--z2;
  digit[1] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_two =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; y1=.75dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=.8dig_w; y3=.9dig_h;
  lft x4=0; bot y4=0;
  draw z1{up}...z2...z3..{(-.8dig_w,-dig_h)}z4;
  z5=z4;
  rt x6=dig_w; bot y6=0;
  draw z5--z6;
  digit[2] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_three =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=.08dig_w; y1=.8dig_h;
  x2=.5dig_w; top y2=dig_h; 
  rt x3=.92dig_w; y3=y1;
  z4=(.5dig_w,.52dig_h);
  rt x5=dig_w; y5=.2dig_h;
  x6=.65dig_w; bot y6=0;
  lft x7=0; y7=y5;
  draw z1{up}..z2..z3..{left}z4{right}..z5..z6...{up}z7;
  digit[3] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_four =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  x1=.75dig_w; bot y1=0;
  x2=x1; top y2=dig_h;
  lft x3=0; y3=.3dig_h;
  rt x4=dig_w; y4=y3;
  draw z1--z2--z3--z4;
  digit[4] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_five =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  rt x1=.95dig_w; top y1=dig_h;
  lft x2=.05dig_w; y2=y1;
  lft x3=0; y3=.45dig_h;
  z4=(.5dig_w,.6dig_h);
  rt x5=dig_w; y5=.3dig_h;
  x6=.65dig_w; bot y6=0;
  lft x7=0; y7=.15dig_h;
  draw z1--z2--z3{up}..z4..z5..z6...{up}z7;
  digit[5] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_six =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  rt x1=dig_w; y1=.8dig_h;
  x2=.45dig_w; top y2=dig_h;
  lft x3=0; y3=.5dig_h;
  x4=.5dig_w; bot y4=0;
  rt x5=dig_w; y5=.3dig_h;
  z6=(.53dig_w,.55dig_h);
  z7=(.03dig_w+.6dig_pen,.25dig_h);
  draw z1{up}...z2...z3...z4...z5...{left}z6{left}...{(1,-10)}z7;
  digit[6] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_seven =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=0; top y1=dig_h;
  rt x2=dig_w; y2=y1;
  lft x3=.2dig_w; bot y3=0;
  draw z1--z2--z3;
  digit[7] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_eight =
  currentpicture := nullpicture;
  pickup pencircle scaled dig_pen;
  lft x1=.08dig_w; y1=.75dig_h;
  x2=.5dig_w; top y2=dig_h;
  rt x3=.92dig_w; y3=y1;
  z4=(.5dig_w,.55dig_h);
  rt x5=dig_w; y5=.25dig_h;
  x6=.5dig_w; bot y6=0;
  lft x7=0; y7=y5;
  draw z1...z2...z3...z4...cycle; 
  draw z4...z5...z6...z7...cycle;
  digit[8] := currentpicture;
  clearxy; clearit; clearpen;
enddef;

def digit_nine =
  currentpicture := nullpicture;
  currentpicture := digit[6] rotated 180;
  digit[9] := currentpicture shifted (dig_w,dig_h);
  clearxy; clearit; clearpen;
enddef;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

digit_zero; digit_one; digit_two; digit_three; digit_four;
digit_five; digit_six; digit_seven; digit_eight; digit_nine;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

beginchar(0,24/22size#,23/22size#,1/22size#); "pion bialy";
  pickup pencircle scaled line_thickness;
  lft x1=1/24w; y1=11/24w;
  rt x2=23/24w; y2=11/24w;
  draw z1..z2..cycle;
  white_circle := currentpicture;
showit;
endchar;

% stop"";

beginchar(1,24/22size#,23/22size#,1/22size#); "pion bialy z 1";
  currentpicture := white_circle 
       + digit[1] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(2,24/22size#,23/22size#,1/22size#); "pion bialy z 2";
  currentpicture := white_circle 
       + digit[2] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(3,24/22size#,23/22size#,1/22size#); "pion bialy z 3";
  currentpicture := white_circle 
       + digit[3] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(4,24/22size#,23/22size#,1/22size#); "pion bialy z 4";
  currentpicture := white_circle 
       + digit[4] shifted (.5w-.6dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(5,24/22size#,23/22size#,1/22size#); "pion bialy z 5";
  currentpicture := white_circle 
       + digit[5] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(6,24/22size#,23/22size#,1/22size#); "pion bialy z 6";
  currentpicture := white_circle 
       + digit[6] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(7,24/22size#,23/22size#,1/22size#); "pion bialy z 7";
  currentpicture := white_circle 
       + digit[7] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(8,24/22size#,23/22size#,1/22size#); "pion bialy z 8";
  currentpicture := white_circle 
       + digit[8] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";

beginchar(9,24/22size#,23/22size#,1/22size#); "pion bialy z 9";
  currentpicture := white_circle 
       + digit[9] shifted (.5w-.5dig_w,11/24w-.5dig_h);
showit;
endchar;

% stop"";


end;


Step 2: Running latex on test1.tex generates the required tfm and pk files.

    %% test1.tex
    \documentclass{article}
    \font\mybl=igobl10
    \font\mywh=igowh10
    \begin{document}
    {\mybl \char0 \char1}   
    {\mywh \char2 \char3}
    \end{document} 

i.e. working properly.

Next step was the test pdflatex test2.tex:

    %% test2.tex
    \documentclass{article}  
    \input showfonts.4ht  
    \begin{document}  
    \showfonts  
    {igobl10}  
    {igowh10}
    {}
    \end{document} 

The PDF-File showed the right glyphs. There has been error messages, that some characters are missing, e.g. Missing character: There is no h in font igobl10!; but this is as expected.

Step 4: Then I run make4ht -m draft test1.tex I got the error message

    --- warning --- Couldn't find font `igowh10.htf' (char codes: 0--9)`

I generated the htf files igobl10.htf and igowh10.htf entering

    igobl10 0 9
    ’ ’  ’1’    '0'
    ’ ’  ’1’    '1'
    ’ ’  ’1’    '2'
    ’ ’  ’1’    '3'
    ’ ’  ’1’    '4'
    ’ ’  ’1’    '5'
    ’ ’  ’1’    '6'
    ’ ’  ’1’    '7'
    ’ ’  ’1’    '8'
    ’ ’  ’1’    '9'
    igobl10 0 9

and the same with

igobl10 0 9
    ’ ’  ’1’    '0'
    ’ ’  ’1’    '1'
    ’ ’  ’1’    '2'
    ’ ’  ’1’    '3'
    ’ ’  ’1’    '4'
    ’ ’  ’1’    '5'
    ’ ’  ’1’    '6'
    ’ ’  ’1’    '7'
    ’ ’  ’1’    '8'
    ’ ’  ’1’    '9'
    igowh10 0 9

I stored this files in the same directory as the TeX-file

Now running make4ht -m draft test1.tex I got the error message

    --- warning --- Improper signature at start of file `.htf'
    --- warning --- File `igowh10.htf' starts/ends with character code 0 instead of 9)
    igowh10 0 9
    0:  ’ ’  ’1’    '0'
    1:  ’ ’  ’1’    '1'
    2:  ’ ’  ’1’    '2'
    3:  ’ ’  ’1’    '3'
    4:  ’ ’  ’1’    '4'
    5:  ’ ’  ’1’    '5'
    6:  ’ ’  ’1’    '6'
    7:  ’ ’  ’1’    '7'
    8:  ’ ’  ’1’    '8'
    9:  ’ ’  ’1’    '9'
    10:  igowh10    0 9--- error --- Improper file `igowh10.htf'

If I commenting out the line {\mywh \char2 \char3} and \font\mywh=igowh10 in my test1.tex I got

    [STATUS]  make4ht: Conversion started
    [STATUS]  make4ht: Input file: test1.tex
    igobl10 0 9
    0:  ’ ’  ’1’    '0'
    1:  ’ ’  ’1’    '1'
    2:  ’ ’  ’1’    '2'
    3:  ’ ’  ’1’    '3'
    4:  ’ ’  ’1’    '4'
    5:  ’ ’  ’1’    '5'
    6:  ’ ’  ’1’    '6'
    7:  ’ ’  ’1’    '7'
    8:  ’ ’  ’1’    '8'
    9:  ’ ’  ’1’    '9'
    10:  igobl10 0 9--- error --- Improper file `igobl10.htf'

which is a little different from the other error message.

Question: What I am doing wrong here?

1 Answer 1

1

Your .htf files are correct, except for the fact that they contain left single quote characters instead of straight quotes, and there should also be no spaces before the first character. This issue is caused by the TeX4ht documentation, which contains the wrong quotes. I've fixed it in the TeX4ht sources, so it hopefully should be fixed on the web soon too.

The correct version looks like this:

igobl10 0 9
' '  '1'    '0'
' '  '1'    '1'
' '  '1'    '2'
' '  '1'    '3'
' '  '1'    '4'
' '  '1'    '5'
' '  '1'    '6'
' '  '1'    '7'
' '  '1'    '8'
' '  '1'    '9'
igobl10 0 9

and

igowh10 0 9
' '  '1'    '0'
' '  '1'    '1'
' '  '1'    '2'
' '  '1'    '3'
' '  '1'    '4'
' '  '1'    '5'
' '  '1'    '6'
' '  '1'    '7'
' '  '1'    '8'
' '  '1'    '9'
igowh10 0 9

With this version, you will get this character listing:

enter image description here

3
  • OK, then I will chance it and remember for the future. Thanks for the support.
    – Ulrich
    Sep 13, 2022 at 11:09
  • It is working!! See i.sstatic.net/P5YMU.png :-)
    – Ulrich
    Sep 14, 2022 at 7:11
  • @Ulrich that's nice!
    – michal.h21
    Sep 14, 2022 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .