]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 952 / 2: Add font settings for snippets utf-8.ly
authorMasamichi Hosoda <trueroad@trueroad.jp>
Sun, 9 Aug 2015 01:28:51 +0000 (10:28 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Mon, 17 Aug 2015 12:18:06 +0000 (21:18 +0900)
This commit adds Unicode fonts `Linux Libertine' settings.

Documentation/snippets/new/utf-8.ly [new file with mode: 0644]

diff --git a/Documentation/snippets/new/utf-8.ly b/Documentation/snippets/new/utf-8.ly
new file mode 100644 (file)
index 0000000..3c01dbf
--- /dev/null
@@ -0,0 +1,78 @@
+\version "2.19.12"
+
+\header {
+  lsrtags = "text"
+
+  texidoc = "
+Various scripts may be used for texts (like titles and lyrics) by
+entering them in UTF-8 encoding, and using a Pango based backend.
+Depending on the fonts installed, this fragment will render Bulgarian
+(Cyrillic), Hebrew, Japanese and Portuguese.
+
+"
+  doctitle = "UTF-8"
+} % begin verbatim
+
+% end verbatim - this comment is a hack to prevent texinfo.tex
+% from choking on non-European UTF-8 subsets
+
+%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
+
+%{
+
+You may have to install additional fonts.
+
+Red Hat Fedora
+
+    taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
+   ttfonts-zh_CN fonts-ja fonts-hebrew
+
+Debian GNU/Linux
+
+   apt-get install emacs-intl-fonts xfonts-intl-.* \
+  ttf-kochi-gothic ttf-kochi-mincho \
+  xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi
+%}
+
+% Font settings for Cyrillic and Hebrew
+% Linux Libertine fonts contain Cyrillic and Hebrew glyphs.
+\paper {
+  #(define fonts
+    (set-global-fonts
+     #:roman "Linux Libertine O"
+     #:sans "Linux Biolinum O"
+     #:typewriter "Linux Libertine Mono O"
+   ))
+}
+
+% Cyrillic font
+bulgarian = \lyricmode {
+  Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон.
+}
+
+hebrew = \lyricmode {
+  זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן.
+}
+
+japanese = \lyricmode {
+  いろはにほへど ちりぬるを
+  わがよたれぞ  つねならむ
+  うゐのおくや  まけふこえて
+  あさきゆめみじ ゑひもせず
+}
+
+% "a legal song to you"
+portuguese = \lyricmode {
+  à vo -- cê uma can -- ção legal
+}
+
+\relative c' {
+  c2 d
+  e2 f
+  g2 f
+  e1
+}
+\addlyrics { \bulgarian }
+\addlyrics { \hebrew }
+\addlyrics { \japanese }
+\addlyrics { \portuguese }