[API][eguile-html-utilities] use font-name-to-style-info-eguile

because font-name-to-style-info is already used by html-fonts.scm
This commit is contained in:
Christopher Lam 2020-12-09 21:51:52 +08:00
parent dcf90b98c0
commit 743df212a1
3 changed files with 6 additions and 5 deletions

View File

@ -34,6 +34,7 @@
(use-modules (srfi srfi-13)) ; for extra string functions
(export string-substitute-alist)
(export font-name-to-style-info-eguile)
(define-public (string-substitute-alist str sub-alist)
(with-output-to-string
@ -100,7 +101,7 @@
(and (defined? 'make-regexp)
(make-regexp "([[:space:]]+(bold|semi-bold|book|regular|medium|light))?([[:space:]]+(normal|roman|italic|oblique))?([[:space:]]+(condensed))?[[:space:]]+([[:digit:]]+)" regexp/icase)))
(define-public (font-name-to-style-info font-name)
(define (font-name-to-style-info-eguile font-name)
;;; Convert a font name as return by a font option to CSS format.
;;; e.g. "URW Bookman L Bold Italic 12" becomes
;;; "font-family: URW Bookman L; font-size: 12pt; font-style: italic; font-weight: bold"

View File

@ -169,9 +169,9 @@
(opt-value displaypage optname-template-file)))
(opt-css-file (find-stylesheet
(opt-value displaypage optname-css-file)))
(opt-heading-font (font-name-to-style-info
(opt-heading-font (font-name-to-style-info-eguile
(opt-value displaypage optname-heading-font)))
(opt-text-font (font-name-to-style-info
(opt-text-font (font-name-to-style-info-eguile
(opt-value displaypage optname-text-font)))
(opt-logofile-header (opt-value displaypage optname-logofile-header))
(opt-logo-width-header (opt-value displaypage optname-logo-width-header))

View File

@ -238,9 +238,9 @@
(opt-value displaypage optname-template-file)))
(opt-css-file (find-stylesheet
(opt-value displaypage optname-css-file)))
(opt-heading-font (font-name-to-style-info
(opt-heading-font (font-name-to-style-info-eguile
(opt-value displaypage optname-heading-font)))
(opt-text-font (font-name-to-style-info
(opt-text-font (font-name-to-style-info-eguile
(opt-value displaypage optname-text-font)))
(opt-logofile (opt-value displaypage optname-logofile))
(opt-logo-width (opt-value displaypage optname-logo-width))