* mf/aybabtu.pe.in (i): Load it.
* scm/framework-tex.scm (otf-font-load-command): Bugfix: subfonts
are not symbols.
* lily/include/open-type-font.hh (count): New method.
* mf/aybabtu.pe.in: Typo.
2004-12-17 Jan Nieuwenhuizen <janneke@gnu.org>
+ * scm/framework-tex.scm (otf-font-load-command): Bugfix: subfonts
+ are not symbols.
+
* lily/include/open-type-font.hh (count): New method.
* mf/aybabtu.pe.in: Typo.
#include "font-metric.hh"
typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
-typedef std::map<String, FT_ULong> Glyph_name_to_index_map;
class Open_type_font : public Font_metric
{
SCM lily_character_table_;
SCM lily_global_table_;
Index_to_charcode_map index_to_charcode_map_;
- Glyph_name_to_index_map glyph_name_to_index_map_;
Open_type_font (FT_Face);
public:
char name[len];
int code = FT_Get_Glyph_Name (face_, signed_idx, name, len);
if (code)
- {
- warning ("FT_Get_Glyph_Name() returned error");
- }
+ warning (_f ("FT_Get_Glyph_Name() returned error: %d", code));
SCM sym = ly_symbol2scm (name);
SCM alist = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
return ((Open_type_font*) this)->index_to_charcode_map_[i];
}
-#if 0
-unsigned
-Open_type_font::glyph_name_to_index (String glyph_name) const
-{
- return ((Open_type_font*) this)->glyph_name_to_charcode_map_[glyph_name];
-}
-#endif
-
int
Open_type_font::count () const
{
{
int cmp = (lo + hi) / 2;
b = fm->get_indexed_char (cmp);
- //b = fm->get_indexed_char (fm->name_to_index ("brace" + to_string (cmp)));
if (b[Y_AXIS].is_empty () || b[Y_AXIS].length () > y)
hi = cmp;
else
$(BRACES:%=$(outdir)/feta-braces-%.otf-table)
FETA_FONTS = $(FETA_MF_FILES:.mf=)
+$(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
+ cat $^ > $@
+$(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
+ echo '(foe . 0)' > $@
LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
$(outdir)/%.otf-table: $(outdir)/%.lisp
cat $< $(subst parmesan,feta,$<) > $@
-$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts
+$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
$(outdir)/aybabtu.subfonts:
echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@
endloop
LoadTableFromFile("LILF", "aybabtu.subfonts")
-LoadTableFromFile("LILC", "feta-braces-a.otf-table")
-LoadTableFromFile("LILY", "feta-braces-a.otf-gtable")
+LoadTableFromFile("LILC", "aybabtu.otf-table")
+LoadTableFromFile("LILY", "aybabtu.otf-gtable")
Generate("aybabtu.otf");
Generate("aybabtu.cff");
(string-append
"\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
-
(define-public (digits->letters str)
(regexp-substitute/global
#f "[-\\._]"
'pre ""
'post))
-
(define-public (tex-font-command-raw name magnification)
(string-append
"magfont"
(tex-font-command-raw
(ly:font-file-name font) (ly:font-magnification font)))
-
(define (otf-font-load-command paper font)
- (let*
- ((sub-fonts (ly:font-sub-fonts font)))
-
+ (let* ((sub-fonts (ly:font-sub-fonts font)))
(string-append
(apply string-append
(map
(lambda (sub-name)
- (string-append
- "\\font\\" (tex-font-command-raw
- (symbol->string sub-name)
- (ly:font-magnification font))
- "=" (symbol->string sub-name)
- " scaled "
- (ly:number->string (inexact->exact
- (round (* 1000
- (ly:font-magnification font)
- (ly:paper-outputscale paper)))))
- "%\n"))
+ (format #f "\\font\\~a=~a scaled ~a%\n"
+ (tex-font-command-raw
+ sub-name (ly:font-magnification font))
+ sub-name
+ (ly:number->string
+ (inexact->exact
+ (round (* 1000
+ (ly:font-magnification font)
+ (ly:paper-outputscale paper)))))))
sub-fonts)))))
(define (simple-font-load-command paper font)
(scm framework-tex)
(lily))
+;; helper functions
+(define (stderr string . rest)
+ (apply format (cons (current-error-port) (cons string rest)))
+ (force-output (current-error-port)))
+
+
;;;;;;;;
;;;;;;;; DOCUMENT ME!
;;;;;;;;
(define (dashed-slur thick dash l)
(embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
-
(define (named-glyph font name)
- (let*
- ((info (ly:otf-font-glyph-info font name)))
-
+ (let* ((info (ly:otf-font-glyph-info font name)))
+ ;;(stderr "INFO: ~S\n" info)
+ ;;(stderr "FONT: ~S\n" font)
(string-append "\\" (tex-font-command-raw
(assoc-get 'subfont info)
(ly:font-magnification font))
(embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
(define (ez-ball c l b)
- (embedded-ps (list 'ez-ball c l b)))
-
-
+ (embedded-ps (list 'ez-ball c l b)))
(define (embedded-ps expr)
(let ((ps-string
(with-output-to-string
(lambda () (ps-output-expression expr (current-output-port))))))
(string-append "\\embeddedps{" ps-string "}")))
-
(define (repeat-slash w a t)
(embedded-ps (list 'repeat-slash w a t)))
-
-
(define (number->dim x)
(string-append
;;ugh ly:* in backend needs compatibility func for standalone output