Vai al contenuto principale
Ricetta numero 152

Ricettario · Capitolo 11 · Fumetti e manga

Una tavola da album in linea chiara, con le didascalie

Una tavola franco-belga su quattro strisce: vignette squadrate, didascalie gialle negli angoli, nuvolette in maiuscolo e minuscolo, tutto dall’opzione comics.

In questa pagina
Genere
Fumetti
Output
Canvas · PDF
Livello
Intermedio
Postext
Provata con Postext 1.65.0
Richiede ≥ 1.25.0 · postext-pdf ≥ 1.25.0
Licenza
Aggiornata il 10 ott 2026
Codice MIT · Testo CC BY 4.0

pp. 2–3 · 1–2 di 2

  • Formato 230 × 300 mm
  • 1 colonna
  • Patrick Hand 11/15
  • Bangers
  • 2 pagine
  • Livello
  • Postext 1.65.0
  • Impaginato in 347 ms
  • 140 righe di codice

In breve

Una pagina di un album a fumetti europeo, con le parole del narratore in riquadri gialli e i dialoghi nelle nuvolette, scritta in testo semplice e disegnata da Postext in dieci lingue.

Che cosa comporrai

La prima storia di un album a fumetti spagnolo, Le arance di Carmen: una pagina del titolo sul verso e, di fronte, una tavola di sette vignette su quattro strisce, come si disegnano gli album franco-belgi. Lola, nove anni, e il nonno Paco vanno al mercato la domenica; lei tira fuori l’arancia in fondo alla piramide di Carmen. I disegni sono in linea chiara a tinte piatte; i bordi delle vignette sono sottili e squadrati, la narrazione sta in riquadri gialli incastrati negli angoli delle vignette, e i dialoghi sono scritti in maiuscolo e minuscolo, come li scrivono i letteristi europei. Il testo vive nel Markdown, un file per lingua: l’originale spagnolo, poi inglese, catalano, cinese, arabo, giapponese, portoghese, francese, tedesco e italiano, ciascuno letterato dal motore sulla stessa suddivisione e sugli stessi disegni.

Questa ricetta risponde a

  • Come compongo una pagina di album europeo con didascalie di narrazione?
  • Come scrivo le nuvolette in Markdown?

La risposta breve

script.js · righe 42–66nel codice completo
const comics = {
  gutter: { horizontal: mm(4.5), vertical: mm(3.5) }, // between tiers, between panels
  panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
  panelStyles: [{ id: 'open', borderStyle: 'none' }], // the last panel: an epilogue, unframed
  lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9 : 8), lineHeight: 1.1,
    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
  balloonStyles: [
    { id: 'speech', fill: col('balloon'), stroke: col('ink'), strokeWidth: pt(0.6) },
    // Narration: rectangles butted into a corner of the panel, never with a tail.
    { id: 'caption', fill: col('cartouche'), stroke: col('ink'), strokeWidth: pt(0.6),
      padding: em(0.45), aspect: 3.4 },
    { id: 'shout', fill: col('balloon'), stroke: col('ink'), burstPoints: 16, fontScale: 1.2 },
    { id: 'thought', fill: col('balloon'), stroke: col('ink') },
    { id: 'sfx', fontFamily: DISPLAY, color: col('orange'), halo: pt(1.6), haloColor: col('ink'),
      fontScale: 2.8 },
  ],
  cast: [ // names for the tagged PDF and EPUB, which read the balloons aloud
    { id: 'lola', name: 'Lola' },
    { id: 'paco', name: t({ es: 'el abuelo Paco', en: 'Grandpa Paco', ca: "l'avi Paco",
      zh: '帕科爷爷', ar: 'الجد باكو', ja: 'パコおじいちゃん', pt: 'o vovô Paco',
      fr: 'Papi Paco', de: 'Opa Paco', it: 'nonno Paco' }) },
    { id: 'carmen', name: 'Carmen' },
  ],
  runningHeads: true, // the folio prints on the comic page too
};

Ingredienti

Tipo
Patrick Hand, Bangers, Noto Sans SC, ZCOOL KuaiLe, Zen Antique, Dela Gothic One, Playpen Sans Arabic, Lalezar (SIL OFL 1.1)
Risorse
  • t1.jpg
  • t2.jpg
  • t3.jpg
  • t4.jpg
  • t5.jpg
  • t6.jpg
  • t7.jpg
  • A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers and pigeons. (Generated With Diffusion Models, originale)
  • Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead between the stalls. (Generated With Diffusion Models, originale)
  • Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, polishes an orange. (Generated With Diffusion Models, originale)
  • Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a hand to stop her. (Generated With Diffusion Models, originale)
  • The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, Carmen throws up her hands, pigeons scatter. (Generated With Diffusion Models, originale)
  • Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, laughing; a pigeon pecks one. (Generated With Diffusion Models, originale)
  • On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's beret. (Generated With Diffusion Models, originale)

Preparazione

#1 · L’aspetto dell’album è una configurazione comics

Il codice è nella risposta breve qui sopra. comics.panel imposta il bordo di ogni vignetta (un filo d’inchiostro di 0,75 pt, angoli vivi) e panelStyles aggiunge uno stile con nome senza bordo, che l’ultima vignetta prende con style=open: un epilogo su una panchina del parco, fuori dal mercato. Gli stili di nuvoletta predefiniti si ridisegnano per id: caption diventa un riquadro giallo pallido con un contorno sottile, shout un’esplosione a sedici punte, sfx l’arancione delle arance con un contorno d’inchiostro. Il lettering mantiene textTransform: 'none'; una tavola americana lo imposterebbe su 'uppercase'.

La tavola in sé è una sola direttiva nel contenuto, un albero di suddivisione e sette vignette, ciascuna con la sua sceneggiatura:

:::page{split="25 [60 | *] / 25 [55 | *] / 24 / * [50 | *]"}
::panel{art=t1}
caption: Los domingos, el abuelo Paco y yo íbamos al mercado.
caption{at=bottom-end}: Siempre a la misma hora. Siempre por la misma puerta.
::panel{art=t4}
lola{thought}: La de abajo es la más gorda.
paco{shout}: ¡Lola, esa no!

caption è un riquadro di narrazione (il primo va nell’angolo top-start), {at=bottom-end} manda il secondo nell’angolo opposto, e un id di personaggio come lola o paco disegna una nuvoletta con la coda verso la bocca che il disegno dichiara.

#2 · I disegni portano con sé i personaggi

script.js · righe 163–337nel codice completo
const box = ([x, y, width, height]) => ({ x, y, width, height });
const who = (id, x, y, head, face) => ({ id, x, y,
  ...(head && { head: { x: head[0], y: head[1] } }), ...(face && { face: box(face) }) });
const ART = {
  t1: { width: 1100, height: 733, safeArea: box([.22, .17, .62, .6]),
    alt: t({ en: 'A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers '
        + 'and pigeons.',
      es: 'Un domingo de sol en Madrid: un mercado de hierro y cristal en una plaza, con gente de '
        + 'compras y palomas.',
      ca: 'Un diumenge de sol a Madrid: un mercat de ferro i vidre en una plaça, amb gent '
        + 'comprant i coloms.',
      zh: '马德里一个晴朗的星期天:广场上一座铁架玻璃顶的市场,有买菜的人和鸽子。',
      ar: 'يوم أحد مشمس في مدريد: سوق من الحديد والزجاج في ساحة، فيها متسوّقون وحمام.',
      ja: '晴れた日曜日のマドリード。広場に鉄とガラスの市場が建ち、買い物客とハトがいる。',
      pt: 'Um domingo de sol em Madri: um mercado de ferro e vidro numa praça, com gente fazendo '
        + 'compras e pombos.',
      fr: 'Un dimanche ensoleillé à Madrid : une halle de fer et de verre sur une place, avec des '
        + 'passants qui font leurs courses et des pigeons.',
      de: 'Ein sonniger Sonntag in Madrid: eine Markthalle aus Eisen und Glas an einem Platz, mit '
        + 'Leuten beim Einkaufen und Tauben.',
      it: 'Una domenica di sole a Madrid: un mercato coperto di ferro e vetro in una piazza, '
        + 'con gente che fa la spesa e piccioni.' }),
  },
  t2: { width: 1000, height: 1000, safeArea: box([.2, .13, .71, .46]),
    alt: t({ en: 'Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead '
        + 'between the stalls.',
      es: 'Dentro del mercado, Lola tira de la mano de su abuelo Paco y señala adelante, entre '
        + 'los puestos.',
      ca: 'Dins del mercat, la Lola estira el seu avi Paco de la mà i assenyala endavant, entre '
        + 'les parades.',
      zh: '市场里,萝拉拉着爷爷帕科的手,指着摊位之间的前方。',
      ar: 'داخل السوق تشدّ لولا جدّها باكو من يده وتشير إلى الأمام بين الأكشاك.',
      ja: '市場の中、ローラが祖父パコの手を引き、売り場のあいだの先を指さしている。',
      pt: 'Dentro do mercado, Lola puxa o avô Paco pela mão e aponta adiante, entre as '
        + 'bancas.',
      fr: 'Dans le marché, Lola tire son grand-père Paco par la main et montre du doigt les étals, '
        + 'devant eux.',
      de: 'In der Markthalle zieht Lola ihren Großvater Paco an der Hand und zeigt nach vorn, '
        + 'zwischen die Stände.',
      it: 'Dentro il mercato, Lola tira per mano il nonno Paco e indica davanti a sé, tra le '
        + 'bancarelle.' }),
    anchors: [
      who('paco', .315, .28, [.32, .2], [.22, .13, .17, .19]),
      who('lola', .7, .415, [.66, .33], [.6, .3, .17, .17]),
    ],
    avoid: [box([.82, .4, .1, .06])],
  },
  t3: { width: 1200, height: 800, safeArea: box([.13, .12, .79, .58]),
    alt: t({ en: 'Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, '
        + 'polishes an orange.',
      es: 'Lola mira hacia arriba una pirámide altísima de naranjas mientras Carmen, la frutera, '
        + 'saca brillo a una naranja.',
      ca: 'La Lola mira amunt una piràmide altíssima de taronges mentre la Carmen, la fruitera, '
        + 'fa brillar una taronja.',
      zh: '萝拉仰头望着一座高高的橙子金字塔,水果摊主卡门正在擦亮一个橙子。',
      ar: 'لولا تنظر إلى هرم عالٍ من البرتقال، بينما كارمن بائعة الفاكهة تلمّع برتقالة.',
      ja: 'ローラがそびえるオレンジのピラミッドを見上げ、果物屋のカルメンはオレンジをみがいている。',
      pt: 'Lola olha para cima, para uma pirâmide altíssima de laranjas, enquanto Carmen, a '
        + 'feirante, lustra uma laranja.',
      fr: 'Lola lève les yeux vers une immense pyramide d’oranges pendant que Carmen, la '
        + 'marchande de fruits, fait briller une orange.',
      de: 'Lola blickt zu einer riesigen Orangenpyramide hinauf, während Carmen, die '
        + 'Obsthändlerin, eine Orange blank reibt.',
      it: 'Lola alza lo sguardo verso un’altissima piramide di arance, mentre Carmen, la '
        + 'fruttivendola, lucida un’arancia.' }),
    anchors: [
      who('lola', .235, .43, [.19, .36], [.14, .3, .13, .18]),
      who('carmen', .795, .27, [.8, .19], [.74, .12, .13, .19]),
    ],
    avoid: [box([.4, .2, .2, .15])],
  },
  t4: { width: 1152, height: 1152, safeArea: box([.08, .08, .76, .65]),
    alt: t({ en: 'Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a '
        + 'hand to stop her.',
      es: 'Lola alarga la mano hacia una naranja de la base del montón; Paco, alarmado, levanta '
        + 'la mano para detenerla.',
      ca: 'La Lola allarga la mà cap a una taronja de la base de la pila; en Paco, alarmat, '
        + 'aixeca la mà per aturar-la.',
      zh: '萝拉伸手去拿最底下的一个橙子;帕科吓了一跳,举手想拦住她。',
      ar: 'لولا تمدّ يدها إلى برتقالة في أسفل الكومة، وباكو مذعورًا يرفع يده ليوقفها.',
      ja: 'ローラが山のいちばん下のオレンジに手をのばし、あわてたパコが止めようと手を上げる。',
      pt: 'Lola estica a mão para uma laranja da base da pilha; Paco, assustado, levanta a mão '
        + 'para impedi-la.',
      fr: 'Lola tend la main vers une orange tout en bas de la pile ; Paco, alarmé, lève la main '
        + 'pour l’arrêter.',
      de: 'Lola greift nach einer Orange ganz unten im Stapel; Paco hebt erschrocken die Hand, '
        + 'um sie aufzuhalten.',
      it: 'Lola allunga la mano verso un’arancia in fondo alla pila; Paco, allarmato, alza la '
        + 'mano per fermarla.' }),
    anchors: [
      who('paco', .31, .3, [.28, .17], [.17, .1, .2, .26]),
      who('lola', .635, .485, [.61, .38], [.48, .28, .27, .27]),
    ],
    // Lola's reaching arm and her hand on the orange: the thought balloon keeps off them.
    avoid: [box([.62, .58, .17, .22]), box([.7, .78, .15, .1]), box([.1, .36, .15, .19])],
  },
  t5: { width: 1100, height: 733, safeArea: box([.06, .16, .9, .41]),
    alt: t({ en: "The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, "
        + "Carmen throws up her hands, pigeons scatter.",
      es: 'La pirámide se derrumba: las naranjas ruedan por todas partes, la boina de Paco sale '
        + 'volando, Carmen levanta los brazos y las palomas huyen.',
      ca: 'La piràmide s’enfonsa: les taronges rodolen per tot arreu, la boina d’en Paco surt '
        + 'volant, la Carmen aixeca els braços i els coloms fugen.',
      zh: '橙子金字塔塌了:橙子滚得到处都是,帕科的贝雷帽飞了出去,卡门举起双手,鸽子四散飞走。',
      ar: 'ينهار هرم البرتقال: البرتقال يتدحرج في كل مكان، وقبعة باكو تطير، وكارمن ترفع يديها، '
        + 'والحمام يتفرّق.',
      ja: 'オレンジのピラミッドがくずれる。オレンジが転がり、パコのベレー帽が飛び、カルメンが両手を上げ、ハトが散る。',
      pt: 'A pirâmide de laranjas desaba: laranjas rolam por toda parte, a boina de Paco sai '
        + 'voando, Carmen ergue os braços e os pombos fogem.',
      fr: 'La pyramide d’oranges s’effondre : les oranges roulent partout, le béret de Paco '
        + 's’envole, Carmen lève les bras et les pigeons s’égaillent.',
      de: 'Die Orangenpyramide stürzt ein: Überall rollen Orangen, Pacos Baskenmütze fliegt '
        + 'davon, Carmen reißt die Arme hoch, und die Tauben flattern auf.',
      it: 'La piramide di arance crolla: le arance rotolano dappertutto, il basco di Paco vola '
        + 'via, Carmen alza le braccia e i piccioni si sparpagliano.' }),
    anchors: [
      who('lola', .15, .44, [.14, .37], [.08, .32, .12, .15]),
      who('paco', .34, .31, [.33, .27], [.27, .22, .12, .14]),
      who('carmen', .81, .37, [.8, .3], [.74, .22, .13, .18]),
      who('sfx', .55, .45),
    ],
    avoid: [box([.24, .12, .09, .1])],
  },
  t6: { width: 1200, height: 800, safeArea: box([.15, .1, .68, .58]),
    alt: t({ en: 'Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, '
        + 'laughing; a pigeon pecks one.',
      es: 'Lola, Paco y Carmen, de rodillas, recogen las naranjas en la boina y el delantal entre '
        + 'risas; una paloma picotea una.',
      ca: 'La Lola, en Paco i la Carmen, de genolls, recullen les taronges a la boina i al '
        + 'davantal entre rialles; un colom en picoteja una.',
      zh: '萝拉、帕科和卡门跪在地上,笑着把橙子捡进贝雷帽和围裙里;一只鸽子在啄一个橙子。',
      ar: 'لولا وباكو وكارمن جاثون يجمعون البرتقال في القبعة والمريلة وهم يضحكون، وحمامة تنقر '
        + 'واحدة.',
      ja: 'ローラとパコとカルメンがひざをつき、笑いながらオレンジをベレー帽とエプロンに集める。ハトが一つつついている。',
      pt: 'Lola, Paco e Carmen, de joelhos, juntam as laranjas na boina e no avental, rindo; um '
        + 'pombo bica uma delas.',
      fr: 'Lola, Paco et Carmen, à genoux, ramassent en riant les oranges dans le béret et le '
        + 'tablier ; un pigeon en picore une.',
      de: 'Lola, Paco und Carmen knien und sammeln lachend die Orangen in die Mütze und die '
        + 'Schürze; eine Taube pickt an einer.',
      it: 'Lola, Paco e Carmen, in ginocchio, raccolgono ridendo le arance nel basco e nel '
        + 'grembiule; un piccione ne becca una.' }),
    anchors: [
      who('lola', .245, .42, [.24, .33], [.17, .27, .14, .2]),
      who('paco', .49, .3, [.48, .22], [.42, .14, .14, .2]),
      who('carmen', .73, .28, [.73, .2], [.67, .12, .13, .19]),
    ],
    avoid: [box([.74, .75, .14, .2])],
  },
  t7: { width: 1300, height: 867, safeArea: box([.19, .17, .56, .58]),
    alt: t({ en: "On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's "
        + "beret.",
      es: 'En un banco del parque, Lola y Paco pelan naranjas y se ríen; una paloma se ha posado '
        + 'en la boina de Paco.',
      ca: 'En un banc del parc, la Lola i en Paco pelen taronges i riuen; un colom s’ha posat a '
        + 'la boina d’en Paco.',
      zh: '公园长椅上,萝拉和帕科剥着橙子笑着;一只鸽子停在帕科的贝雷帽上。',
      ar: 'على مقعد في الحديقة يقشّر لولا وباكو البرتقال ويضحكان، وحمامة تقف على قبعة باكو.',
      ja: '公園のベンチでローラとパコがオレンジをむいて笑っている。パコのベレー帽にハトがとまっている。',
      pt: 'Num banco de praça, Lola e Paco descascam laranjas e riem; um pombo pousou na boina '
        + 'de Paco.',
      fr: 'Sur un banc du parc, Lola et Paco épluchent des oranges en riant ; un pigeon s’est posé '
        + 'sur le béret de Paco.',
      de: 'Auf einer Parkbank schälen Lola und Paco Orangen und lachen; auf Pacos Mütze sitzt '
        + 'eine Taube.',
      it: 'Su una panchina del parco, Lola e Paco sbucciano arance ridendo; un piccione si è '
        + 'posato sul basco di Paco.' }),
    anchors: [
      who('lola', .32, .45, [.31, .35], [.24, .3, .15, .22]),
      who('paco', .6, .38, [.65, .25], [.54, .2, .19, .24]),
    ],
    avoid: [box([.6, .01, .13, .15])],
  },

};

Ogni disegno dichiara ciò che ogni ritaglio deve conservare (safeArea), dove si trovano bocca, testa e viso di ogni personaggio (anchors) e ciò che nessuna nuvoletta può coprire (avoid), tutto in frazioni del disegno. La vignetta dello scontro occupa la terza striscia, 200 mm per 63 mm, quindi la sua zona sicura è la fascia dei visi e delle arance in volo; le vignette quadrate perdono il pavimento. Niente qui dipende dalla lingua, quindi le dieci edizioni lo condividono.

#3 · Una pagina del titolo di fronte alla storia

script.js · righe 70–86nel codice completo
const centred = (id, y) => ({ anchor: { to: id, edge: 'below' }, offset: { y: mm(y) },
  size: { width: 'fill', height: 'auto' } }); // full width, so align: 'center' centres it
const titlePage = {
  id: 'title-page', numbered: false, toc: false, breakBefore: { enabled: true, parity: 'any' },
  advancedDesign: { enabled: true, minHeight: mm(212), slot: { elements: [
    { kind: 'text', id: 'series', content: '{attr.series}', fontFamily: LETTER, fontSize: pt(17),
      color: col('ink'), align: 'center', overflow: 'wrap',
      placement: { anchor: { to: 'container', edge: 'top-left' }, offset: { y: mm(24) },
        size: { width: 'fill', height: 'auto' } } },
    { kind: 'text', id: 'title', content: '{titleText}', fontFamily: DISPLAY, fontSize: pt(58),
      lineHeight: 1.05, color: col('orange'), align: 'center', overflow: 'wrap',
      placement: centred('#series', 5) },
    { kind: 'image', id: 'vignette', resourceId: 't3', decorative: true, // 3 : 2, uncropped
      placement: { anchor: { to: '#title', edge: 'below' }, offset: { x: mm(10), y: mm(14) },
        size: { width: mm(180), height: mm(120) } } },
  ] } },
};

La pagina del titolo è uno stile di titolo: la riga della collana nel carattere del lettering, il titolo nel carattere delle onomatopee (Bangers, oppure Dela Gothic One, ZCOOL KuaiLe e Lalezar nelle altre scritture), e una vignetta della bancarella di Carmen nella sua forma 3 : 2. La composizione passa continuation: { pageIndexOffset: 1 }, così la pagina del titolo è un verso e la storia si apre sul recto di fronte, pagina 3.

La ricetta completa

Sandbox
// ═══ Postext Cookbook · Nº 152 · An album page in clear line, with narration captions ═══
// https://postext.dev/en/cookbook/tebeo-album-page
// Code: MIT · Story: written for the recipe (CC BY 4.0) · Pictures: generated with diffusion models
// Fonts: Patrick Hand, Bangers, the comic faces of each script (OFL) · Needs postext ≥ 1.25.0
// A Spanish album page in the Franco-Belgian way: four tiers, yellow narration boxes, and
// balloons lettered in upper and lower case. Every edition re-letters the same split and art.
import {
  buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage, defaultComicFont,
  defaultComicSfxFont,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';

const LANG = 'it'; // @lang: 'es' | 'en' | 'ca' | 'zh' | 'ar' | 'ja' | 'pt' | 'fr' | 'de' | 'it'
const RECIPE = 'tebeo-album-page';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: flat clear-line colours: ink, the oranges, the yellow of the cartouches
const palette = {
  ink: '#1d1b19', // outlines, lettering
  orange: '#d9601a', // the title and the sound effect (3.6:1 on paper, display sizes only)
  cartouche: '#fbe8a6', // narration boxes
  balloon: '#ffffff',
  muted: '#5f5a54', // credits
  paper: '#fffdf8',
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = [
  ...Object.entries(palette).map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } })),
  { id: 'main-color', name: 'orange (defaults)', value: { hex: palette.orange, model: 'hex' } },
];
// #endregion

const LOCALE = t({ es: 'es', en: 'en-gb', ca: 'ca', zh: 'zh-Hans', ar: 'ar', ja: 'ja',
  pt: 'pt-BR', fr: 'fr', de: 'de', it: 'it' });
// A hand that letters in upper and lower case for the Latin editions; the engine's comic
// faces for Chinese, Japanese and Arabic, which a Latin hand cannot set.
const LATIN = ['es', 'en', 'ca', 'pt', 'fr', 'de', 'it'].includes(LANG);
const LETTER = LATIN ? 'Patrick Hand' : defaultComicFont(LOCALE);
const DISPLAY = defaultComicSfxFont(LOCALE); // Bangers, Dela Gothic One, ZCOOL KuaiLe, Lalezar

// #region answer: the album's look: thin square frames, yellow cartouches, mixed-case lettering
const comics = {
  gutter: { horizontal: mm(4.5), vertical: mm(3.5) }, // between tiers, between panels
  panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
  panelStyles: [{ id: 'open', borderStyle: 'none' }], // the last panel: an epilogue, unframed
  lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9 : 8), lineHeight: 1.1,
    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
  balloonStyles: [

Lo script.js composto funziona così com’è: incollalo nello script modulo di qualsiasi pagina, oppure apri la ricetta su CodePen. Cartella della ricetta su GitHub ↗ (si apre in una nuova scheda)

Varianti

#Letterare in maiuscolo, come un fumetto americano

Imposta il lettering in maiuscolo; narrazione e dialoghi seguono, e le scritture senza maiuscole (cinese, giapponese, arabo) restano come sono.

-    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
+    color: col('ink'), textTransform: 'uppercase' },

Errori frequenti

  • Il corpo del lettering è uno solo per tutto il libro: una traduzione più lunga ingrandisce le sue nuvolette e le sposta, non rimpicciolisce mai il testo. Controlla le pagine catalana e araba dopo una modifica alla suddivisione. Le colonne giapponesi sono alte per queste vignette basse: tre righe di content.ja.md contengono un at= che le fissa lontano da Paco e dalle arance di cui parla l’ultima vignetta.
  • Il testo alternativo di ogni vignetta sta nel manifesto dei disegni in dieci lingue, scelto con t({ … }); una lingua che manca dall’elenco legge la prima. ::panel{alt="…"} in un file di contenuto lo sostituisce per una vignetta.

Crediti

Testo
  • Las naranjas de Carmen (Carmen's Oranges), a one-page comic written for this recipe, in six languages · Postext Cookbook · CC BY 4.0
Immagini
  • A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers and pigeons. · Generated With Diffusion Models · originale
  • Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead between the stalls. · Generated With Diffusion Models · originale
  • Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, polishes an orange. · Generated With Diffusion Models · originale
  • Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a hand to stop her. · Generated With Diffusion Models · originale
  • The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, Carmen throws up her hands, pigeons scatter. · Generated With Diffusion Models · originale
  • Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, laughing; a pigeon pecks one. · Generated With Diffusion Models · originale
  • On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's beret. · Generated With Diffusion Models · originale
Font
Patrick Hand (SIL OFL 1.1) · Bangers (SIL OFL 1.1) · Noto Sans SC (SIL OFL 1.1) · ZCOOL KuaiLe (SIL OFL 1.1) · Zen Antique (SIL OFL 1.1) · Dela Gothic One (SIL OFL 1.1) · Playpen Sans Arabic (SIL OFL 1.1) · Lalezar (SIL OFL 1.1)
SandboxPDF