Skip to content

Commit

Permalink
corrected beginchar/clpchar
Browse files Browse the repository at this point in the history
begin char + code offset correction
  • Loading branch information
MarcoMueller committed Apr 17, 2016
1 parent f4a18b0 commit a8327d7
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 81 deletions.
2 changes: 1 addition & 1 deletion font.mf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

font_size 10pt#; % the "design size" of this font @hidden
ht#:=7pt#; % height of characters @hidden
x_ht#:=5pt#; % x-height of characters $ 3 / 6
x_ht#:=4.5pt#; % x-height of characters $ 3 / 6
desc_depth#:=2.5pt#; % depth of descenders $ 1 / 3
u#:=0.1pt#; % unit width $ 0.05 / 2
xgap#:=0.6pt#; % horizontal adjustment @hidden
Expand Down
8 changes: 2 additions & 6 deletions fontbase.mf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ font_normal_shrink 2u#;
font_x_height x_ht#;
%font_quad 18u#+2s#;
font_extra_space 2u#;
code_offset:=0; % may later used for small caps

%define_pixels(s,u);
%define_whole_pixels(xgap);
Expand Down Expand Up @@ -732,14 +733,9 @@ pair charanchorbots_[];
pair charanchortoprights_[];

def clpchar(expr name, width, height, depth) =
beginchar(enc(name),width,height,depth)
beginchar(enc(name)+code_offset,width,height,depth)
enddef;

%def ffmchar(expr name, unit_width, height, depth) =
% beginchar(enc(name)+code_offset,if unit_width=0: 0 else: unit_width*u#+2s# fi,height,depth);
% pickup logo_pen
%enddef;

%extra_endchar := extra_endchar&"charpictures_[charcode]:=currentpicture;"
% &"charwidths_[charcode]=charwd;"
% &"charheights_[charcode]=charht;"
Expand Down
Loading

0 comments on commit a8327d7

Please sign in to comment.