Skip to content

Commit

Permalink
[API][eguile-html-utilities] use font-name-to-style-info-eguile
Browse files Browse the repository at this point in the history
because font-name-to-style-info is already used by html-fonts.scm
  • Loading branch information
christopherlam committed Dec 9, 2020
1 parent dcf90b9 commit 743df21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gnucash/report/eguile-html-utilities.scm
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions gnucash/report/reports/standard/receipt.scm
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions gnucash/report/reports/standard/taxinvoice.scm
Expand Up @@ -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))
Expand Down

0 comments on commit 743df21

Please sign in to comment.