|
|
@ -111,19 +111,14 @@
|
|
|
|
(hash-set! attrs :font-size base-size-adjusted)
|
|
|
|
(hash-set! attrs :font-size base-size-adjusted)
|
|
|
|
(hash-set! attrs prev-font-size-key base-size-adjusted))
|
|
|
|
(hash-set! attrs prev-font-size-key base-size-adjusted))
|
|
|
|
|
|
|
|
|
|
|
|
(define (resolve-line-height! attrs)
|
|
|
|
(define ((make-updater-based-on-font-size attrs) val)
|
|
|
|
;; convert line-height attributes into a simple line height
|
|
|
|
|
|
|
|
(hash-update! attrs :line-height
|
|
|
|
|
|
|
|
(λ (val)
|
|
|
|
|
|
|
|
(define adjustment (parse-percentage-or-em val))
|
|
|
|
(define adjustment (parse-percentage-or-em val))
|
|
|
|
(define base-height (if adjustment (hash-ref attrs :font-size) val))
|
|
|
|
(define base-height (if adjustment (hash-ref attrs :font-size) val))
|
|
|
|
(and base-height (* base-height (or adjustment 1))))
|
|
|
|
(and base-height (* base-height (or adjustment 1))))
|
|
|
|
default-line-height))
|
|
|
|
|
|
|
|
|
|
|
|
(define (resolve-line-height! attrs)
|
|
|
|
|
|
|
|
;; convert line-height attributes into a simple line height
|
|
|
|
|
|
|
|
(hash-update! attrs :line-height (make-updater-based-on-font-size attrs) default-line-height))
|
|
|
|
|
|
|
|
|
|
|
|
(define (resolve-font-tracking! attrs)
|
|
|
|
(define (resolve-font-tracking! attrs)
|
|
|
|
(hash-update! attrs :font-tracking
|
|
|
|
(hash-update! attrs :font-tracking (make-updater-based-on-font-size attrs) 0))
|
|
|
|
(λ (val)
|
|
|
|
|
|
|
|
(define adjustment (parse-percentage-or-em val))
|
|
|
|
|
|
|
|
(define base-tracking (if adjustment (hash-ref attrs :font-size) val))
|
|
|
|
|
|
|
|
(and base-tracking (* base-tracking (or adjustment 1))))
|
|
|
|
|
|
|
|
0))
|
|
|
|
|