diff options
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf')
-rw-r--r-- | Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf | 173 |
1 files changed, 105 insertions, 68 deletions
diff --git a/Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf b/Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf index 31cc8f69870..af4a9b28e4d 100644 --- a/Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf +++ b/Master/texmf-dist/fonts/source/public/fdsymbol/fdbase.mf @@ -1,5 +1,5 @@ % -% Copyright (c) 2011, Michael Ummels <michael.ummels@rwth-aachen.de> +% Copyright (c) 2012, Michael Ummels <michael.ummels@rwth-aachen.de> % % This Font Software is licensed under the SIL Open Font License, % Version 1.1. This license is in the accompanying file OFL.txt, and @@ -10,8 +10,8 @@ design_size := 10; font_size design_size * pt#; if known ps_output: - font_version := "1.004"; - font_comment := "Copyright (c) 2011, Michael Ummels. This Font Software is licensed under the SIL Open Font License, Version 1.1."; + font_version := "1.008"; + font_comment := "Copyright (c) 2012, Michael Ummels. This Font Software is licensed under the SIL Open Font License, Version 1.1."; fi u# := 0.6pt#; @@ -23,19 +23,19 @@ math_axis# := 2.75pt#; if weight_index = 0: % Book line_thickness# := 0.64pt#; rule_thickness# := 0.56pt#; - dot_size# := 0.84pt#; + dot_size# := 0.75pt#; elseif weight_index = 1: % Regular line_thickness# := 0.74pt#; rule_thickness# := 0.58pt#; - dot_size# := 0.9pt#; + dot_size# := 0.84pt#; elseif weight_index = 2: % Medium line_thickness# := 0.86pt#; rule_thickness# := 0.6pt#; - dot_size# := 0.97pt#; + dot_size# := 0.94pt#; else: % Bold line_thickness# := 1.0pt#; rule_thickness# := 0.64pt#; - dot_size# := 1.05pt#; + dot_size# := 1.06pt#; fi; side_bearing# := 1.5u#; @@ -109,6 +109,7 @@ def beginsymbol(expr width, height, depth) = current_char := current_char + 1; beginchar(current_char, width, height, depth); if not known ps_output: + proofrule((side_bearing, math_axis),(w - side_bearing, math_axis)); proofrule((side_bearing, h),(side_bearing, -d)); proofrule((w - side_bearing, h),(w - side_bearing, -d)); fi @@ -228,7 +229,7 @@ enddef; def dot(expr centre, radius) = superellipse(centre + radius * right, centre + radius * up, - centre - radius * right, centre - radius * up, 0.57) + centre - radius * right, centre - radius * up, 0.6) enddef; % Draw macros @@ -467,82 +468,118 @@ def stroke_through_arrow(expr pos, alpha, spread)(text angles) = endgroup; enddef; -def draw_product(expr centre, width, height, sign, thick) = - thin := 1/2thick; +def draw_product(expr centre, width, height, sign, thick, serifs) = + if serifs: + thicker := 11/8thick; + thinner := 5/8thick; + else: + thicker := 4/3thick; + thinner := thick; + fi z1r - z0r = z3r - z2r = width * right; - z2r - z0r = sign * (height - thin) * up; + y2r - y0l = sign * height; + x2r = x0r; 1/2[1/2[z0l,z1l], 1/2[z2r,z3r]] = centre; - z4 = z0 + min(5thin, 2/5width) * right; - z5 = z1 + min(5thin, 2/5width) * left; - z6 = 1/2[z0,z4] + sign * 4/3thin * up; - z7 = 1/2[z1,z5] + sign * 4/3thin * up; - x8 = 1/2[x0,x4]; - x9 = 1/2[x1,x5]; - y8 = y9 = y2 - sign * 4/3thin; - - penpos0(thin, sign * 100); - penpos1(thin, sign * 80); - penpos2(thin, sign * 93); - penpos3(thin, sign * 87); - penpos4(thin, sign * 80); - penpos5(thin, sign * 100); - penpos6(thick, 0); - penpos7(thick, 0); - penpos8(thick, 0); - penpos9(thick, 0); + z4 - z0 = z1 - z5 = min(3thicker, 2/5width) * right; + x6 = x8 = 1/2[x0,x4]; + x7 = x9 = 1/2[x1,x5]; + if serifs: + y6 - y0 = y7 - y1 = sign * 1/4(x4 - x0); + y2 - y8 = y3 - y9 = sign * 1/4(x4 - x0); + else: + y6 = y7 = y0l; + y8 = y9 = y2l; + fi - y10 = y11 = y2r - sign * 1/2[thin,thick]; + penpos0(thinner, sign * 100); + penpos1(thinner, sign * 80); + if serifs: + penpos2(thinner, sign * 93); + penpos3(thinner, sign * 87); + else: + penpos2(thicker, sign * 90); + penpos3(thicker, sign * 90); + fi + penpos4(thinner, sign * 80); + penpos5(thinner, sign * 100); + penpos6(thicker, 0); + penpos7(thicker, 0); + penpos8(thicker, 0); + penpos9(thicker, 0); + + y10 = y11 = y2r - sign * 1/2[thinner,thicker]; x10 = x6r; x11 = x7l; - fill z0l -- z4l -- z4r{dir (sign * 160)} .. {sign * up}z6r -- z10 -- z11 -- z7l{sign * down} .. {dir (-sign * 160)}z5r -- z5l -- z1l -- z1r{dir (sign * 160)} .. {sign * up}z7r -- z9r{sign * up} .. {dir (sign * 15)}z3l -- z3r -- z2r -- z2l{dir (-sign * 15)} .. {sign * down}z8l -- z6l{sign * down} .. {dir (-sign * 160)}z0r -- cycle; - - penlabels(0,1,2,3,4,5,6,7,8,9,10,11); + if serifs: + fill z0l -- z4l -- z4r{dir (sign * 165)} ... {sign * up}z6r -- z10 -- z11 -- z7l{sign * down} ... {dir (-sign * 165)}z5r -- z5l -- z1l -- z1r{dir (sign * 165)} ... {sign * up}z7r -- z9r{sign * up} ... {dir (sign * 15)}z3l -- z3r -- z2r -- z2l{dir (-sign * 15)} ... {sign * down}z8l -- z6l{sign * down} ... {dir (-sign * 165)}z0r -- cycle; + penlabels(0,1,2,3,4,5,6,7,8,9,10,11); + else: + fill z6l -- z8l -- z2l -- z2r -- z3r -- z3l -- z9r -- z7r -- z7l -- z9l -- z8r -- z6r -- cycle; + penlabels(2,3,6,7,8,9); + fi enddef; -def draw_sum(suffix $)(expr centre, width, height, thick) = - thin := 1/2thick; +def draw_sum(suffix $)(expr centre, width, height, thick, serifs) = + thicker := 11/8thick; + thinner := 1/2thick; + alpha := angle(width, height - thicker); z1$ - z0$ = z3$ - z2$ = width * right; z2$ - z0$ = height * up; 1/2[1/2[z0$,z1$], 1/2[z2$,z3$]] = centre; - z4$ - z1$ = z3$ - z5$.l = 3thin * up; - z6$ = whatever[z0$,z1$] + thin * up = z4$ - whatever * dir 77; + z4$ - z1$ = z3$ - z5$.l = 3/2thicker * up; + if serifs: + z6$ = whatever[z0$,z1$] + thicker/2 * up = z4$ - whatever * dir 77; + z3$ - z7$ = 2/3thicker * up; + else: + z6$l = z1$; + z3$ - z7$ = thicker * up; + fi z8$r = z2$ + whatever * right; z8$l = z2$ + whatever * down; - - penpos6$(thick, 90); - penpos4$(thin, 167); - penpos5$(thin, 180); - penpos8$(5/6thick, 77); - - z13$ = centre; - - penpos13$(6/5thick, 10); - - z3$ - z7$ = 2/3thick * up; - z9$ = z13$r + whatever * (z8$l - z13$l) = z7$ + whatever * right; - z10$r = z0$ + whatever * up; z10$l = z0$ + whatever * right; + z9$' = 1/4[z7$,z8$l]; + z11$' = 1/4[z6$r,z10$r]; + z12$ = centre; + + if serifs: + penpos4$(thinner, 167); + penpos5$(thinner, 180); + penpos6$(thicker, 90); + penpos8$(5/6thicker, 77); + penpos10$(3/4thicker, 103); + penpos12$(thicker / sind alpha, 10); + else: + penpos6$(thicker, 90); + penpos8$(thicker, 90); + penpos10$(thicker, 90); + penpos12$(thicker / sind alpha, 0); + fi - penpos10$(3/4thick, 103); - - z11$ = z13$r + whatever * (z10$r - z13$l); + z9$ = z12$r + whatever * (z8$l - z12$l) = z7$ + whatever * right; + z11$ = z12$r + whatever * (z10$r - z12$l); y11$ = y10$r; - fill z10$l -- z6$l -- z4$l -- z4$r{-dir 77} .. {left}1/4[z6$r,z10$r] -- z11$ -- z13$r -- z9$ -- 1/4[z7$,z8$l]{right} .. {-dir 113}z5$r -- z5$l -- z3$ -- z8$r -- z8$l -- z13$l -- z10$r -- cycle; - - penlabels(3$,4$,5$,6$,7$,8$,9$,10$,11$,12$,13$); + if serifs: + fill z10$l -- z6$l -- z4$l -- z4$r{-dir 77} ... {z11$ - z11$'}z11$' -- z11$ -- z12$r -- z9$ -- z9$'{z9$' - z9$} ... {-dir 113}z5$r -- z5$l -- z3$ -- z8$r -- z8$l -- z12$l -- z10$r -- cycle; + penlabels(3$,4$,5$,6$,7$,8$,9$,10$,11$,12$); + else: + fill z10$l -- z6$l -- z6$r -- z11$ -- z12$r -- z9$ -- z7$ -- z3$ -- z8$r -- z8$l -- z12$l -- z10$r -- cycle; + penlabels(3$,6$,7$,8$,9$,10$,11$,12$); + fi enddef; def draw_integral(suffix $)(expr scale, centre, thick) = - penpos0$(thick, 0); - penpos1$(thick, 0); - penpos2$(2/3thick, -90); - penpos3$(thick, 0); - penpos4$(2/3thick, -90); + thicker := 4/3thick; + + penpos0$(thicker, 0); + penpos1$(thicker, 0); + penpos2$(9/8thick, -105); + penpos3$(thicker, 0); + penpos4$(thick, -90); z0$ = 1/2[z1$,z3$] = 1/2[z2$,z4$]; z1$ - z3$ = whatever * up; @@ -553,15 +590,15 @@ def draw_integral(suffix $)(expr scale, centre, thick) = y6$r = -d; y1$ = 2/3[y0$,y2$]; - penpos5$(3/4thick,-105); - penpos6$(3/4thick,-82); + penpos5$(9/8thick,-105); + penpos6$(9/8thick,-82); - y5$l = y2$l; + y5$l = y2$l - 1/12thick; x5$r = 5/4[x1$, x2$]; - y6$l = y4$.l; + y6$l = y4$l; x6$r = 5/4[x3$, x4$]; - ucorr := max (x2$r, x1$r + 1/4thick) - x2$r; + ucorr := max (x2$r, x1$r + 3/8thick) - x2$r; x2$ := x2$ + ucorr; x2$l := x2$l + ucorr; x2$r := x2$r + ucorr; @@ -569,7 +606,7 @@ def draw_integral(suffix $)(expr scale, centre, thick) = x5$r := x5$r + ucorr; x5$l := x5$l + ucorr; - lcorr := min (x4$l, x1$l - 1/4thick) - x4$l; + lcorr := min (x4$l, x1$l - 3/8thick) - x4$l; x4$ := x4$ + lcorr; x4$l := x4$l + lcorr; x4$r := x4$r + lcorr; @@ -577,7 +614,7 @@ def draw_integral(suffix $)(expr scale, centre, thick) = x6$r := x6$r + lcorr; x6$l := x6$l + lcorr; - fill z5$l .. z2$l{left} .. {down}z1$l -- z3$l{down} .. z4$l{left} .. z6$l -- z6$r + fill z5$l .. z2$l ... {down}z1$l -- z3$l{down} ... z4$l{left} .. z6$l -- z6$r .. {up}z3$r -- z1$r{up} .. z2$r{right} .. z5$r -- cycle; penlabels(0$,1$,2$,3$,4$,5$,6$); |