[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cafe Lily confine
From: |
Valentin Villenave |
Subject: |
Re: Cafe Lily confine |
Date: |
Sun, 3 May 2020 18:22:41 +0200 |
On 5/3/20, Pierre Perol-Schneider <address@hidden> wrote:
> Je vous joins la fonte -- non aboutie -- "LilyFont" (le nom n'est pas
> judicieux, mais bon...)
Et du coup ça me permet de démontrer le mécanisme dont je parlais dans
l’autre fil de discussion (je l’aurais bien mis sur le LSR mais il n’y
a _aucun_ moyen de faire tourner ça en mode -dsafe, et pour cause) :
%%%%
%% OpenType font encoded in Base64:
lilyfont = "
T1RUTwAKAIAAAwAgQ0ZGIE0H1wMAAAUYAAAKUUZGVE2NPGqvAAAPbAAAABxPUy8yfn52wwAAARAA
AABgY21hcAxxFVMAAAOkAAABUmhlYWQeEVshAAAArAAAADZoaGVhHYb+qQAAAOQAAAAkaG10eEZJ
BHkAAA+IAAAANG1heHAADVAAAAABCAAAAAZuYW1lfvUtIQAAAXAAAAI0cG9zdP9qAGYAAAT4AAAA
IAABAAAAAQYk1ZEHS18PPPUACwgAAAAAANnpl/QAAAAA2epwhQAH9dILFxG1AAAACAACAAAAAAAA
AAEAABG19dIAuAsSAAD9twsXAAEAAAAAAAAAAAAAAAAAAAANAABQAAANAAAABAWGAZAABQAABTMF
mQAAAR4FMwWZAAAD1wBmAhIAAAIABQMAAAAAAAAAAAABAAAAAAAAAAAAAAAAUGZFZACAACkARwZm
/mYAuBG1Ci4AAAABAAAAAAAAEbUAIAAgAAEAAAAOAK4AAQAAAAAAAAAqAFYAAQAAAAAAAQAIAJMA
AQAAAAAAAgAHAKwAAQAAAAAAAwAkAP4AAQAAAAAABAAIATUAAQAAAAAABQAOAVwAAQAAAAAABgAI
AX0AAwABBAkAAABUAAAAAwABBAkAAQAQAIEAAwABBAkAAgAOAJwAAwABBAkAAwBIALQAAwABBAkA
BAAQASMAAwABBAkABQAcAT4AAwABBAkABgAQAWsAQwBvAHAAeQByAGkAZ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6n7TftL+w77hvwyl/uuk/tW9wT8EffL+xEI
9677BvvJ979e9yFX9zmC93j3Nvdf9zL3WvclfM/7zLD7P+T7+6f7MbT7d+oq/BdqCPn2+IgVSCH7
rfyOLPg1TfeX+wb4q3P3EVT3s/if+4H3HvtEzTb3Dvun+yv7ggj+rxwKNRU2+Yv3a/lU+In37vcd
+yHj/Ccp+5T7FPvk+7371Pvh+/UIDhwFURQcBOQVd58cB06NHApliwaLDAr3Ewr3EYyMoIyM9073
BQwM9xEL9ZKPkwwNAAAAAAAAAQAAAADZaGI1AAAAANnpl/QAAAAA2epwhQQAAAAEzAAABVEAtASl
AIIFTwAOBNIAWwXAAHwFCgBbBOsArASDAGYFLwBsBO0AfgsSAAc=
"
% TODO: this should be rewritten (e.g. using rnrs bytevectors, see base64
% implementations in guile-gnome and guile-gcrypt) as soon as
% compatibility with Guile v1.8 is no longer needed. -vv
#(define (base64-decode out-port input)
(let ((base64-decode-table (make-hash-table 64))
(alphabet
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
(in-port (if (string? input)
(open-input-string input)
input))
(current-state 1)
(current-char '())
(byte #f)
(top-bits '())
(bottom-bits '()))
(map (lambda (item)
(hash-set! base64-decode-table item
(string-index alphabet item)))
(string->list alphabet))
;; inspired by https://sourceware.org/legacy-ml/guile/2000-01/msg00622.html
;; looks clunky but gets the job done.
(while
(not (eof-object? current-char))
(set! current-char (read-char in-port))
(case current-state
((1) (begin
(set! byte
(hashv-ref base64-decode-table current-char))
(if byte
(begin
(set! top-bits
(* (logand byte #b00111111) 4))))))
((2) (if (eof-object? current-char)
(begin
(set! bottom-bits #b00000000)
(write-char (integer->char
(logior top-bits bottom-bits))
out-port))
(begin
(set! byte
(hashv-ref base64-decode-table current-char))
(if byte
(begin
(set! bottom-bits
(/ (logand byte #b00110000) 16))
(write-char (integer->char
(logior top-bits bottom-bits))
out-port)
(set! top-bits
(* (logand byte #b00001111) 16)))))))
((3) (if (eof-object? current-char)
(begin
(set! bottom-bits #b00000000)
(write-char (integer->char
(logior top-bits bottom-bits))
out-port))
(begin
(set! byte
(hashv-ref base64-decode-table current-char))
(if byte
(begin
(set! bottom-bits
(/ (logand byte #b00111100) 4))
(write-char (integer->char
(logior top-bits bottom-bits))
out-port)
(set! top-bits
(* (logand byte #b00000011) 64)))))))
((4) (if (eof-object? current-char)
(begin
(set! bottom-bits #b00000000)
(write-char (integer->char
(logior top-bits bottom-bits))
out-port))
(begin
(set! byte
(hashv-ref base64-decode-table current-char))
(if byte
(begin
(set! bottom-bits
(logand byte #b00111111))
(write-char (integer->char
(logior top-bits bottom-bits))
out-port)))))))
(if byte
(begin
(if (eqv? current-state 4)
(set! current-state 1)
(set! current-state (1+ current-state)))
(set! byte #f))))
#t))
tmpdir = #(or (getenv "TMPDIR") "/tmp")
fontfile =
#(string-append
(port-filename (mkstemp! (string-append tmpdir "/" "lilyfont-XXXXXX")))
".otf")
\book {
#(let* ((port (open-output-file fontfile)))
(if (guile-v2) (set-port-encoding! port "ISO-8859-1"))
(base64-decode port lilyfont)
(close port))
#(ly:font-config-add-font fontfile)
\markuplist {
\number "0123456789" \vspace #.5
\override #'(font-name . "LilyFont") "0123456789"
}
{
\override Staff.TimeSignature.font-name = "LilyFont"
\time 3/4
\tuplet 3/2 { c''8 b' a' }
\override TupletNumber.font-name = "LilyFont"
\override TupletNumber.font-size = #-4
\tuplet 3/2 { c''8 b' a' }
}
}
\book {
#(delete-file fontfile)
\markup { This files should have been removed: #fontfile }
}
%%%%
V.
- Re: Cafe Lily confine, (continued)
- Re: Cafe Lily confine, Jean-Julien Fleck, 2020/05/02
- Re: Cafe Lily confine, nicolas lehembre, 2020/05/02
- Re: Cafe Lily confine, Pierre Perol-Schneider, 2020/05/02
- Re: Cafe Lily confine, Pierre Perol-Schneider, 2020/05/02
- Re: Cafe Lily confine, Vincent Gay, 2020/05/02
- Re: Cafe Lily confine, Pierre Perol-Schneider, 2020/05/02
- Re: Cafe Lily confine, Yoann LE BARS, 2020/05/02
- Re: Cafe Lily confine, Jean Louis Thiry, 2020/05/03
- Re: Cafe Lily confine, Pierre Perol-Schneider, 2020/05/03
- Re: Cafe Lily confine, Pierre Perol-Schneider, 2020/05/03
- Re: Cafe Lily confine,
Valentin Villenave <=
- Re: Cafe Lily confine, nicolas lehembre, 2020/05/02
- StrokeFinger.font-size et structure, Olivier Geay, 2020/05/02
- Re: StrokeFinger.font-size et structure, Pierre Perol-Schneider, 2020/05/02
- Re: StrokeFinger.font-size et structure, Olivier Geay, 2020/05/02
- Re: StrokeFinger.font-size et structure, Pierre Perol-Schneider, 2020/05/02
- Message not available
- Re: StrokeFinger.font-size et structure, Pierre Perol-Schneider, 2020/05/02
- Re: Cafe Lily confine, Marc, 2020/05/02
- Re: Cafe Lily confine, MGmail, 2020/05/02
- Re: Cafe Lily confine, Yoann LE BARS, 2020/05/02
Re: Cafe Lily confine, Yoann LE BARS, 2020/05/02