diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-06-22 17:01:32 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-06-22 17:01:32 +0200 |
| commit | 5de92f6d5e482af412763ba40e55a16102b79b20 (patch) | |
| tree | 1b291d6e66108b6fe0f3e512d4179b5531753eb1 /src/lib.rs | |
| parent | 099ce71aba54a40455b7ce35768c8fe003f7b16a (diff) | |
Add monospace syntax 📰
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -20,7 +20,7 @@ //! use typeset::export::pdf::PdfExporter; //! //! // Simple example source code. -//! let src = "Hello World from __Typeset__! 🌍"; +//! let src = "Hello World from _Typeset_! 🌍"; //! //! // Create a typesetter with a font provider that provides three fonts //! // (two sans-serif fonts and a fallback for the emoji). @@ -193,11 +193,11 @@ mod test { ("CMU-Serif-Italic.ttf", font!["Computer Modern", Italic, Serif]), ("CMU-Serif-Bold.ttf", font!["Computer Modern", Bold, Serif]), ("CMU-Serif-Bold-Italic.ttf", font!["Computer Modern", Bold, Italic, Serif]), - ("CMU-Typewriter-Regular.ttf", font!["Computer Modern", Regular, Monospace]), - ("CMU-Typewriter-Italic.ttf", font!["Computer Modern", Italic, Monospace]), - ("CMU-Typewriter-Bold.ttf", font!["Computer Modern", Bold, Monospace]), - ("CMU-Typewriter-Bold-Italic.ttf", font!["Computer Modern", Bold, Italic, Monospace]), - ("NotoEmoji-Regular.ttf", font!["Noto", Regular, SansSerif, Serif, Monospace]), + ("CMU-Typewriter-Regular.ttf", font!["Computer Modern", Regular, Serif, SansSerif, Monospace]), + ("CMU-Typewriter-Italic.ttf", font!["Computer Modern", Italic, Serif, SansSerif, Monospace]), + ("CMU-Typewriter-Bold.ttf", font!["Computer Modern", Bold, Serif, SansSerif, Monospace]), + ("CMU-Typewriter-Bold-Italic.ttf", font!["Computer Modern", Bold, Italic, Serif, SansSerif, Monospace]), + ("NotoEmoji-Regular.ttf", font!["Noto", Regular, Bold, Italic, SansSerif, Serif, Monospace]), ])); // Typeset into document. @@ -213,20 +213,21 @@ mod test { #[test] fn features() { test("features", r" - **Features Test Page** + *Features Test Page* - __Multiline:__ + _Multiline:_ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est. - __Emoji:__ Hello World! 🌍 + _Emoji:_ Hello World! 🌍 - __Styles:__ This is made **bold** and that __italic__ using the built-in syntax! + _Styles:_ This is made *bold*, that _italic_ and this one `monospace` using the + built-in syntax! - __Styles with functions:__ This is in [bold][boldface] and that is in [italic][italics] - using library functions! + _Styles with functions:_ This [bold][word] is made bold and [italic][that] is italic + using the standard library functions [mono][bold] and `italic`! "); } |
