scribble: fix image metrics in HTML output for exact fractions
Avoid generating sizes such as `1003790/1581`. original commit: 3801fc0432701c2081f9732aa793b3beb3bbc211
This commit is contained in:
parent
e0c3ac776e
commit
f9164dee10
|
@ -1403,14 +1403,19 @@
|
||||||
(if (and (not (list? cvt))
|
(if (and (not (list? cvt))
|
||||||
(equal? request 'png@2x-bytes))
|
(equal? request 'png@2x-bytes))
|
||||||
(/ v 2.0)
|
(/ v 2.0)
|
||||||
v))])
|
v))]
|
||||||
|
[number->decimal-string (lambda (s)
|
||||||
|
(number->string
|
||||||
|
(if (integer? s)
|
||||||
|
s
|
||||||
|
(exact->inexact s))))])
|
||||||
(list
|
(list
|
||||||
(add-padding
|
(add-padding
|
||||||
cvt
|
cvt
|
||||||
`(img ([src ,(install-file "pict.png" bstr)]
|
`(img ([src ,(install-file "pict.png" bstr)]
|
||||||
[alt "image"]
|
[alt "image"]
|
||||||
[width ,(number->string (scale w))]
|
[width ,(number->decimal-string (scale w))]
|
||||||
[height ,(number->string (scale h))]))))))]
|
[height ,(number->decimal-string (scale h))]))))))]
|
||||||
[(case request
|
[(case request
|
||||||
[(svg-bytes)
|
[(svg-bytes)
|
||||||
(or (convert e 'svg-bytes+bounds8)
|
(or (convert e 'svg-bytes+bounds8)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user