OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> | 3 ;;;; Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> |
4 ;;;; | 4 ;;;; |
5 ;;;; LilyPond is free software: you can redistribute it and/or modify | 5 ;;;; LilyPond is free software: you can redistribute it and/or modify |
6 ;;;; it under the terms of the GNU General Public License as published by | 6 ;;;; it under the terms of the GNU General Public License as published by |
7 ;;;; the Free Software Foundation, either version 3 of the License, or | 7 ;;;; the Free Software Foundation, either version 3 of the License, or |
8 ;;;; (at your option) any later version. | 8 ;;;; (at your option) any later version. |
9 ;;;; | 9 ;;;; |
10 ;;;; LilyPond is distributed in the hope that it will be useful, | 10 ;;;; LilyPond is distributed in the hope that it will be useful, |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 (define (font-file-as-ps-string name file-name font-index) | 333 (define (font-file-as-ps-string name file-name font-index) |
334 (let* ((downcase-file-name (string-downcase file-name))) | 334 (let* ((downcase-file-name (string-downcase file-name))) |
335 (cond | 335 (cond |
336 ((and file-name (string-endswith downcase-file-name ".pfa")) | 336 ((and file-name (string-endswith downcase-file-name ".pfa")) |
337 (embed-document file-name)) | 337 (embed-document file-name)) |
338 ((and file-name (string-endswith downcase-file-name ".pfb")) | 338 ((and file-name (string-endswith downcase-file-name ".pfb")) |
339 (ly:pfb->pfa file-name)) | 339 (ly:pfb->pfa file-name)) |
340 ((and file-name (string-endswith downcase-file-name ".ttf")) | 340 ((and file-name (string-endswith downcase-file-name ".ttf")) |
341 (ly:ttf->pfa file-name)) | 341 (ly:ttf->pfa file-name)) |
342 ((and file-name (string-endswith downcase-file-name ".ttc")) | 342 ((and file-name (string-endswith downcase-file-name ".ttc")) |
343 (ly:ttf->pfa file-name font-index)) | 343 ;; TODO: distinguish files which have extension `*.ttc' |
| 344 ;; whether TrueType Collection (TTC) fonts |
| 345 ;; or OpenType/CFF Collection (OTC) fonts. |
| 346 (ly:ttf->pfa file-name font-index)) ;; TTC fonts |
344 ((and file-name (string-endswith downcase-file-name ".otf")) | 347 ((and file-name (string-endswith downcase-file-name ".otf")) |
345 (ps-embed-cff (ly:otf->cff file-name) name 0)) | 348 (ps-embed-cff (ly:otf->cff file-name) name 0)) |
| 349 ((and file-name (string-endswith downcase-file-name ".otc")) |
| 350 ;; The files which have the extension `*.otc' are OTC fonts. |
| 351 (ps-embed-cff (ly:otf->cff file-name font-index) name 0)) ;; OTC fonts |
346 (else | 352 (else |
347 (ly:warning (_ "do not know how to embed ~S=~S") name file-name) | 353 (ly:warning (_ "do not know how to embed ~S=~S") name file-name) |
348 "")))) | 354 "")))) |
349 | 355 |
350 (define (mac-font? bare-file-name) | 356 (define (mac-font? bare-file-name) |
351 (and (eq? PLATFORM 'darwin) | 357 (and (eq? PLATFORM 'darwin) |
352 bare-file-name | 358 bare-file-name |
353 (or (string-endswith bare-file-name ".dfont") | 359 (or (string-endswith bare-file-name ".dfont") |
354 (= (stat:size (stat bare-file-name)) 0)))) | 360 (= (stat:size (stat bare-file-name)) 0)))) |
355 | 361 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 | 762 |
757 lilypond -dbackend=eps FILE | 763 lilypond -dbackend=eps FILE |
758 | 764 |
759 If you have cut & pasted a lilypond fragment from a webpage, be sure | 765 If you have cut & pasted a lilypond fragment from a webpage, be sure |
760 to only remove anything before | 766 to only remove anything before |
761 | 767 |
762 %% **************************************************************** | 768 %% **************************************************************** |
763 %% Start cut-&-pastable-section | 769 %% Start cut-&-pastable-section |
764 %% **************************************************************** | 770 %% **************************************************************** |
765 "))) | 771 "))) |
OLD | NEW |