This commit is contained in:
John Whitington 2022-09-16 20:10:49 +01:00
parent 54d67ae413
commit 748939ae00
1 changed files with 8 additions and 2 deletions

View File

@ -560,7 +560,10 @@ let
(fontsize *. float (Pdfstandard14.baseline_adjustment font)) /. 1000. (fontsize *. float (Pdfstandard14.baseline_adjustment font)) /. 1000.
in in
voffset := !voffset +. baseline_adjustment voffset := !voffset +. baseline_adjustment
| _ -> () | Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
voffset := !voffset +. capheight /. 2.
| _ ->
Printf.eprintf "Unable to find midline adjustment in this font\n"
end end
else else
if topline then if topline then
@ -570,7 +573,10 @@ let
(fontsize *. float (Pdfstandard14.baseline_adjustment font) *. 2.0) /. 1000. (fontsize *. float (Pdfstandard14.baseline_adjustment font) *. 2.0) /. 1000.
in in
voffset := !voffset +. baseline_adjustment voffset := !voffset +. baseline_adjustment
| _ -> () | Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
voffset := !voffset +. capheight
| _ ->
Printf.eprintf "Unable to find midline adjustment in this font\n"
end end
else else
iter iter