mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-02-16 11:50:54 +01:00
Correct -topline / -midline adjustments for TrueType fonts
This commit is contained in:
parent
c5271a6d9f
commit
04fad2295b
@ -529,7 +529,7 @@ let
|
|||||||
in
|
in
|
||||||
voffset := !voffset +. baseline_adjustment
|
voffset := !voffset +. baseline_adjustment
|
||||||
| Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
|
| Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
|
||||||
voffset := !voffset +. capheight /. 2.
|
voffset := !voffset +. capheight /. 2. /. 1000.
|
||||||
| _ ->
|
| _ ->
|
||||||
Pdfe.log "Unable to find midline adjustment in this font\n"
|
Pdfe.log "Unable to find midline adjustment in this font\n"
|
||||||
end
|
end
|
||||||
@ -542,9 +542,9 @@ let
|
|||||||
in
|
in
|
||||||
voffset := !voffset +. baseline_adjustment
|
voffset := !voffset +. baseline_adjustment
|
||||||
| Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
|
| Some (Pdftext.SimpleFont {fontdescriptor = Some {capheight}}) ->
|
||||||
voffset := !voffset +. capheight
|
voffset := !voffset +. capheight /. 1000.
|
||||||
| _ ->
|
| _ ->
|
||||||
Pdfe.log "Unable to find midline adjustment in this font\n"
|
Pdfe.log "Unable to find topline adjustment in this font\n"
|
||||||
end;
|
end;
|
||||||
let encoding =
|
let encoding =
|
||||||
match font with
|
match font with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user