باختصار
صفحتان من قصة مصوّرة يابانية. تُكتب الطبعة اليابانية من أعلى إلى أسفل في أعمدة ضيقة، وتحافظ الطبعات الأخرى على ترتيب الإطارات الياباني بدءًا من أعلى اليمين.
ما الذي ستنضده
الصفحتان الأوليان من مانغا عن الكندو، 前の晩 (الليلة السابقة)، كُتبت لهذه الوصفة ورُسمت بالأبيض والأسود: تتدرّب هانا وحدها عشية بطولة المحافظة، ويحمل إليها سورا تميمة من المعبد، ثم يصرفهما المدرّب إلى البيت. يأتي الأصل الياباني أولًا، بالطريقة التي تُكتب بها المجلات الأسبوعية: خط «أنتيك» (الكانا بقَطع مينتشو والكانجي بقَطع غوثيك)، وفقاعات طويلة لا عريضة، ولا نقطة في آخر الفقاعة. وفي مقابلهما الصفحتان نفسهما بالعربية، تبدأ قراءتهما أيضًا من الإطار الأعلى على اليمين، كما تُنشر المانغا المترجمة منذ مطلع الألفية. المقاس B6 بأبعاد 128 × 182 مم، مقاس المجلدات اليابانية.
تجيب هذه الوصفة عن
- كيف أنضّد مانغا تُقرأ من اليمين إلى اليسار؟
- كيف أكتب اليابانية عموديًا داخل الفقاعات؟
الجواب المختصر
const comics = (lang) => ({
// The pages were drawn for right-to-left reading: panel 1 sits top right. The
// reading direction stays 'auto', which follows the art in a left-to-right
// language too: the English page keeps the Japanese panel order.
artDirection: 'rtl',
mirrorArt: false, // never flop the art: Hana's grip on the sword, the kimono's fold
gutter: { horizontal: mm(4.5), vertical: mm(2) }, // a tier gap twice the panel gap
panel: { borderWidth: pt(0.9), borderColor: col('ink'), background: col('paper') },
lettering: {
fontFamily: EDITIONS[lang].faces[0], color: col('ink'),
fontSize: pt(['ja', 'zh'].includes(lang) ? 8.5 : 7.5), // one size per edition
// 'auto' sets Japanese in columns of 8 characters at most and drops the final 。.
// Chinese goes in columns too: a book bound on the right never mixes the two.
writingMode: lang === 'zh' ? 'vertical' : 'auto',
},
balloonStyles: balloons(),
});
المكونات
- الميزات
- اتجاه القراءة وترتيب المانغاكتابة نصوص القصص المصورةإعادة كتابة النصوص بلغات أخرىالنص العموديالخطوط الصينية واليابانية والكوريةكتب مجلّدة من اليمينتقسيم الإطاراترسم الإطار وقصّهالشخصيات ونقاط الارتكازصفحات القصص المصورةأنماط الفقاعاتالمؤثرات الصوتيةلوحة ألوان دلاليةصفحات على اللوحة (Canvas)التصدير إلى PDF
- تستخدم أيضًا
- تقسيم الأسطر في النص الصينيحدود الإطارات والفواصلفوريغانا: قراءات الكانا فوق الكانجيلون الورقالخطوط المضمَّنة في PDFالأشكال والجداول بوصفها مواردقراءات ruby: pinyin وzhuyinأرقام قائمة في النص العمودي
- الخطوط
- Zen Antique, Dela Gothic One, Comic Neue, Bangers, Noto Sans SC, ZCOOL KuaiLe, Playpen Sans Arabic, Lalezar (SIL OFL 1.1)
- الأصول
kendo-charm.jpgkendo-closeup.jpgkendo-coach.jpgkendo-dojo.jpgkendo-doorway.jpgkendo-kneel.jpgkendo-roof.jpgkendo-smile.jpgkendo-swing.jpg- The school's old wooden kendo dojo at dusk, its doors open and lit (Generated With Diffusion Models, أصلي)
- Hana alone in the dojo, swinging her bamboo sword overhead (Generated With Diffusion Models, أصلي)
- Sora peeking round the sliding door with a shrine charm (Generated With Diffusion Models, أصلي)
- Close-up of Hana's sweating face (Generated With Diffusion Models, أصلي)
- Sora holding out the charm to Hana (Generated With Diffusion Models, أصلي)
- Coach Mori in the doorway, backlit, arms crossed (Generated With Diffusion Models, أصلي)
- Close-up of Coach Mori's small smile (Generated With Diffusion Models, أصلي)
- Hana tying the charm to her armour while Sora scratches his head (Generated With Diffusion Models, أصلي)
- Hana and Sora on the school roof at sunset, seen from behind (Generated With Diffusion Models, أصلي)
طريقة التحضير
#1 · اقرأ في الاتجاه الذي رُسمت به
الشيفرة في الجواب المختصر أعلاه. يبني رسّام المانغا كل صفحة من أعلى اليمين: الإطار الأول، وأول من يتكلم، ومسار العين عبر كل صف تبدأ كلها هناك. يخبر artDirection: 'rtl' المحرّك بذلك، ومع ترك اتجاه القراءة على 'auto' تتبع كل طبعة الرسم؛ والطبعة العربية تُقرأ من اليمين إلى اليسار على أي حال. لا يُعكس الرسم أبدًا. ظلّ الناشرون الغربيون يعكسون المانغا حتى نحو عام 2002، فصار كل مبارز أعسر وانطبقت أطراف الكيمونو بالمقلوب؛ ترك الصفحات كما رُسمت يكلّف القارئ عادة واحدة، أما عكسها فيكلّف الرسم نفسه. لكل :::page تقسيمه 30 / 34 [46 | *] / * [44 | *]، وتوضع الخلية الأولى من كل صف على اليمين (اتجاه القراءة).
#2 · علّم كل شخصية مرة واحدة على الرسم
const ART = { // fractions of the picture: the same in every language
dojo: {
alt: t({ en: 'The old wooden kendo dojo at dusk, its doors open and lit.',
es: 'El viejo dojo de madera al anochecer, con las puertas abiertas e iluminadas.',
ca: 'L’antic dojo de fusta al capvespre, amb les portes obertes i il·luminades.',
fr: 'Le vieux dojo en bois au crépuscule, portes ouvertes et éclairées.',
de: 'Das alte Kendo-Dojo aus Holz in der Abenddämmerung, die Türen offen und erleuchtet.',
it: 'Il vecchio dojo di legno all’imbrunire, con le porte aperte e illuminate.',
pt: 'O velho dojô de madeira ao anoitecer, com as portas abertas e iluminadas.',
zh: '黄昏时分的老木造剑道场,门敞开着,里面亮着灯。',
ar: 'قاعة الكندو الخشبية القديمة عند الغسق، أبوابها مفتوحة ومضاءة.',
ja: '夕暮れの古い木造の剣道場。戸が開いて、中に明かりがともっている。' }),
safeArea: { x: 0.45, y: 0.32, width: 0.5, height: 0.51 },
anchors: [{ id: 'dojo', x: 0.66, y: 0.63 }] },
swing: {
alt: t({ en: 'Hana, alone in the dojo, swings her bamboo sword overhead.',
es: 'Hana, sola en el dojo, alza la espada de bambú sobre la cabeza.',
ca: 'La Hana, sola al dojo, aixeca l’espasa de bambú per sobre del cap.',
fr: 'Hana, seule dans le dojo, lève son sabre de bambou au-dessus de sa tête.',
de: 'Hana, allein im Dojo, schwingt ihr Bambusschwert über dem Kopf.',
it: 'Hana, sola nel dojo, alza la spada di bambù sopra la testa.',
pt: 'Hana, sozinha no dojô, ergue a espada de bambu acima da cabeça.',
zh: '花独自在道场里,把竹剑高举过头。',
ar: 'هانا وحدها في القاعة ترفع سيف الخيزران فوق رأسها.',
ja: 'ひとり道場で、竹刀を頭上に振りかぶる花。' }),
safeArea: { x: 0.36, y: 0, width: 0.31, height: 0.5 },
avoid: [{ x: 0.43, y: 0, width: 0.17, height: 0.12 }],
anchors: [{ id: 'hana', x: 0.535, y: 0.28, head: { x: 0.53, y: 0.22 },
face: { x: 0.49, y: 0.14, width: 0.11, height: 0.17 } }] },
doorway: {
alt: t({ en: 'Sora peeks round the sliding door, holding a shrine charm.',
es: 'Sora se asoma por la puerta corredera con un amuleto en la mano.',
ca: 'En Sora treu el cap per la porta corredissa amb un amulet a la mà.',
fr: 'Sora passe la tête par la porte coulissante, une amulette à la main.',
de: 'Sora späht mit einem Schreinamulett in der Hand um die Schiebetür.',
it: 'Sora si affaccia dalla porta scorrevole, con un amuleto in mano.',
pt: 'Sora espia pela porta de correr com um amuleto na mão.',
zh: '空从拉门后探出头,手里攥着护身符。',
ar: 'سورا يطلّ من وراء الباب المنزلق وفي يده تميمة.',
ja: 'お守りを手に、引き戸の陰からのぞく空。' }),
safeArea: { x: 0.37, y: 0.09, width: 0.34, height: 0.5 },
avoid: [{ x: 0.49, y: 0.41, width: 0.08, height: 0.1 }],
anchors: [{ id: 'sora', x: 0.545, y: 0.31, head: { x: 0.55, y: 0.22 },
face: { x: 0.47, y: 0.16, width: 0.2, height: 0.18 } }] },
closeup: {
alt: t({ en: "Close-up of Hana's sweating, startled face.",
es: 'Primer plano del rostro sudoroso y sobresaltado de Hana.',
ca: 'Primer pla de la cara suada i sobresaltada de la Hana.',
fr: 'Gros plan sur le visage en sueur et surpris de Hana.',
de: 'Nahaufnahme von Hanas verschwitztem, erschrockenem Gesicht.',
it: 'Primo piano del volto sudato e sorpreso di Hana.',
pt: 'Primeiro plano do rosto suado e assustado de Hana.',
zh: '花满脸是汗、吃了一惊的特写。',
ar: 'لقطة قريبة لوجه هانا المتعرّق المذعور.',
ja: '汗をかき、はっとした花の顔のアップ。' }),
safeArea: { x: 0.27, y: 0.28, width: 0.43, height: 0.51 },
anchors: [{ id: 'hana', x: 0.475, y: 0.665, head: { x: 0.45, y: 0.35 },
face: { x: 0.3, y: 0.3, width: 0.4, height: 0.45 } }] },
charm: {
alt: t({ en: 'Sora holds out the charm; Hana looks at it, sword on her shoulder.',
es: 'Sora le tiende el amuleto; Hana lo mira con la espada al hombro.',
ca: 'En Sora li allarga l’amulet; la Hana el mira amb l’espasa a l’espatlla.',
fr: 'Sora tend l’amulette ; Hana la regarde, le sabre sur l’épaule.',
de: 'Sora hält ihr das Amulett hin; Hana betrachtet es, das Schwert auf der Schulter.',
it: 'Sora porge l’amuleto; Hana lo guarda, con la spada sulla spalla.',
pt: 'Sora estende o amuleto; Hana olha para ele com a espada no ombro.',
zh: '空递出护身符,花扛着竹剑看着它。',
ar: 'سورا يمدّ التميمة، وهانا تنظر إليها والسيف على كتفها.',
ja: '空がお守りを差し出し、竹刀を肩にかついだ花がそれを見る。' }),
safeArea: { x: 0.21, y: 0.09, width: 0.56, height: 0.53 },
avoid: [{ x: 0.43, y: 0.47, width: 0.06, height: 0.09 }],
anchors: [{ id: 'sora', x: 0.325, y: 0.335, head: { x: 0.29, y: 0.22 },
face: { x: 0.26, y: 0.17, width: 0.11, height: 0.2 } },
{ id: 'hana', x: 0.675, y: 0.335, head: { x: 0.665, y: 0.22 },
face: { x: 0.62, y: 0.17, width: 0.11, height: 0.2 } }] },
coach: {
alt: t({ en: 'Coach Mori in the doorway, backlit, arms crossed.',
es: 'El entrenador Mori en la puerta, a contraluz, de brazos cruzados.',
ca: 'L’entrenador Mori a la porta, a contrallum, de braços plegats.',
fr: 'L’entraîneur Mori sur le seuil, à contre-jour, bras croisés.',
de: 'Trainer Mori in der Tür, im Gegenlicht, mit verschränkten Armen.',
it: 'L’allenatore Mori sulla porta, in controluce, a braccia conserte.',
pt: 'O treinador Mori na porta, contra a luz, de braços cruzados.',
zh: '森老师站在门口,背着光,双臂抱在胸前。',
ar: 'المدرّب موري عند الباب، والضوء خلفه، عاقدًا ذراعيه.',
ja: '逆光の戸口で腕を組んで立つ森先生。' }),
safeArea: { x: 0.33, y: 0.13, width: 0.3, height: 0.32 },
anchors: [{ id: 'mori', x: 0.425, y: 0.215, head: { x: 0.42, y: 0.17 },
face: { x: 0.37, y: 0.13, width: 0.1, height: 0.11 } }] },
smile: {
alt: t({ en: "Close-up of Mori's stern face breaking into a small smile.",
es: 'Primer plano del rostro severo de Mori, que esboza una sonrisa.',
ca: 'Primer pla de la cara severa d’en Mori, que esbossa un somriure.',
fr: 'Gros plan sur le visage sévère de Mori, qui esquisse un sourire.',
de: 'Nahaufnahme von Moris strengem Gesicht, das sich zu einem kleinen Lächeln löst.',
it: 'Primo piano del volto severo di Mori, che accenna un sorriso.',
pt: 'Primeiro plano do rosto severo de Mori, que esboça um sorriso.',
zh: '森老师严肃的脸上露出一丝笑意的特写。',
ar: 'لقطة قريبة لوجه موري الصارم وقد ارتسمت عليه ابتسامة.',
ja: '厳しい顔がふっとゆるむ森先生のアップ。' }),
safeArea: { x: 0.43, y: 0.21, width: 0.51, height: 0.53 },
anchors: [{ id: 'mori', x: 0.69, y: 0.52, head: { x: 0.6, y: 0.25 },
face: { x: 0.45, y: 0.28, width: 0.45, height: 0.32 } }] },
kneel: {
alt: t({ en: 'Kneeling, Hana ties the charm to her armour; Sora scratches his head.',
es: 'De rodillas, Hana se ata el amuleto a la armadura; Sora se rasca la cabeza.',
ca: 'De genolls, la Hana es lliga l’amulet a l’armadura; en Sora es grata el cap.',
fr: 'À genoux, Hana attache l’amulette à son armure ; Sora se gratte la tête.',
de: 'Kniend bindet Hana das Amulett an ihre Rüstung; Sora kratzt sich am Kopf.',
it: 'In ginocchio, Hana lega l’amuleto all’armatura; Sora si gratta la testa.',
pt: 'De joelhos, Hana amarra o amuleto na armadura; Sora coça a cabeça.',
zh: '花跪坐着把护身符系在护具上,空挠着头。',
ar: 'هانا جاثية تربط التميمة بدرعها، وسورا يحكّ رأسه.',
ja: '正座してお守りを防具に結ぶ花と、頭をかく空。' }),
safeArea: { x: 0.21, y: 0.08, width: 0.61, height: 0.48 },
avoid: [{ x: 0.27, y: 0.43, width: 0.06, height: 0.12 }],
anchors: [{ id: 'hana', x: 0.305, y: 0.245, head: { x: 0.3, y: 0.17 },
face: { x: 0.25, y: 0.1, width: 0.11, height: 0.17 } },
{ id: 'sora', x: 0.7, y: 0.25, head: { x: 0.71, y: 0.15 },
face: { x: 0.64, y: 0.1, width: 0.13, height: 0.18 } }] },
roof: {
alt: t({ en: 'Seen from behind, Hana and Sora sit on the school roof at sunset.',
es: 'De espaldas, Hana y Sora sentados en la azotea del instituto al atardecer.',
ca: 'D’esquena, la Hana i en Sora asseguts al terrat de l’institut a la posta.',
fr: 'De dos, Hana et Sora assis sur le toit du lycée au coucher du soleil.',
de: 'Von hinten: Hana und Sora sitzen bei Sonnenuntergang auf dem Schuldach.',
it: 'Di spalle, Hana e Sora seduti sul tetto della scuola al tramonto.',
pt: 'De costas, Hana e Sora sentados no terraço da escola ao pôr do sol.',
zh: '夕阳下,花和空坐在学校楼顶的背影。',
ar: 'هانا وسورا جالسان على سطح المدرسة عند الغروب، من الخلف.',
ja: '夕焼けの屋上に並んで座る花と空の後ろ姿。' }),
safeArea: { x: 0.24, y: 0.41, width: 0.47, height: 0.31 },
anchors: [{ id: 'hana', x: 0.36, y: 0.52, head: { x: 0.36, y: 0.48 },
face: { x: 0.31, y: 0.43, width: 0.11, height: 0.14 } },
{ id: 'sora', x: 0.63, y: 0.52, head: { x: 0.625, y: 0.47 },
face: { x: 0.58, y: 0.41, width: 0.1, height: 0.15 } }] },
};
const panels = () => Promise.all([
comicPanel('dojo', asset('kendo-dojo.jpg'), ART.dojo),
comicPanel('swing', asset('kendo-swing.jpg'), ART.swing),
comicPanel('doorway', asset('kendo-doorway.jpg'), ART.doorway),
comicPanel('closeup', asset('kendo-closeup.jpg'), ART.closeup),
comicPanel('charm', asset('kendo-charm.jpg'), ART.charm),
comicPanel('coach', asset('kendo-coach.jpg'), ART.coach),
comicPanel('smile', asset('kendo-smile.jpg'), ART.smile),
comicPanel('kneel', asset('kendo-kneel.jpg'), ART.kneel),
comicPanel('roof', asset('kendo-roof.jpg'), ART.roof),
]);
تتغيّر الكلمات بتغيّر اللغة، أما الرسم فلا. لكل صورة منطقة آمنة يحفظها كل قصّ، ولكل شخصية فمٌ (يتجه إليه ذيل الفقاعة) ورأسٌ (لفقاعات التفكير) ووجهٌ لا تغطيه فقاعة، وكلها بنِسَب من أبعاد الصورة. يذكر كل سطر في النص الشخصية المتكلّمة، sora: …، فيضع المحرّك الفقاعة قرب تلك الشخصية في أي لغة. وإذا لم تظهر الشخصية المتكلّمة في الإطار، كسورا حين يظهر المدرّب عند الباب، اتجه الذيل إلى حافة الإطار: sora{tail=bottom}.
#3 · دع كل لغة تملأ فقاعاتها
const balloons = () => [
{ id: 'speech', fill: col('paper'), stroke: col('ink'), strokeWidth: pt(0.6), roundness: 2 },
{ id: 'whisper', fill: col('paper'), stroke: col('ink'), roundness: 2 },
{ id: 'thought', fill: col('paper'), stroke: col('ink') },
{ id: 'inner', fill: col('tone'), stroke: col('tone'), strokeWidth: pt(0), italic: false },
{ id: 'caption', fill: col('paper'), stroke: col('ink'), strokeWidth: pt(0.5) },
{ id: 'sfx', color: col('ink'), haloColor: col('paper') },
];
تحدّد الأنماط نوع الصوت: بيضاوي للكلام، وحدٌّ متقطّع للهمس، وسحابة للتفكير، ومربع رمادي لصوت هانا الداخلي. أما ترتيب الكلمات داخلها فمن شأن كل طبعة. في اليابانية ينضّد المحرّك أعمدة من ثمانية محارف على الأكثر، ويحذف 。 في آخر الفقاعة ويُبقي 、، ويُقيم رقمَي 第42回 في خانة واحدة (:tcy[42])، ويضع !? متجاورتين في خانة واحدة. ويذكر النص قراءة كل اسم عند أول ظهور له، {一ノ瀬|いちのせ}، كما تكتب المانغا الفوريغانا فوق الأسماء. وفي العربية تصير الفقاعات نفسها بيضاوية بأسطر أفقية تُقرأ من اليمين.
#4 · حمّل خطوط كل طبعة بكلماتها
const SFX = /^sfx[^::\n]*[::](.*)$/gm; // sound-effect lines: the second face sets them
async function loadEdition(lang) {
const text = TEXT[lang];
const [face, sfx] = EDITIONS[lang].faces;
const faces = { [face]: FONTS[face], [sfx]: FONTS[sfx] };
if (['ja', 'zh'].includes(lang)) { // CJK: only the files that hold these characters
const effects = [...text.matchAll(SFX)].map((m) => m[1]).join('');
await loadCjkFonts({ [face]: FONTS[face] }, text.replace(SFX, ''), { vertical: true });
await loadCjkFonts({ [sfx]: FONTS[sfx] }, effects, { vertical: true });
}
if (lang === 'ar') await loadArabicFonts(faces, text);
await loadComicFonts(faces, text); // the bold and italic the faces do not ship
}
يتوزّع كل من Zen Antique وDela Gothic One على نحو مئة ملف، ملفٍّ لكل نطاق من المحارف: يُحمَّل كل خط بالكلمات التي ينضّدها، الفقاعات للأول والمؤثرات الصوتية للثاني، فلا تجلب الصفحة إلا الملفات التي تحتاجها. ويعلن loadComicFonts الثخين للصراخ والمائل للصوت الداخلي من الملفات التي تتوفر لهذه الخطوط فعلًا، فترسم الشاشة وملف PDF الحروف نفسها.
#5 · ضع الأصل بجانب كل طبعة
const FACING = LANG === 'ja' ? 'en' : LANG; // Japanese readers see the English edition
const TEXT = { ja: original, [FACING]: LANG === 'ja' ? english : markdown };
await loadFonts(FONTS, Object.values(TEXT).join('\n'));
const resources = await panels();
const build = async (lang) => { // the same pictures and page; this language's lettering
await loadEdition(lang);
return withLoadedFonts(() => buildDocument({ markdown: TEXT[lang], resources,
continuation: { pageIndexOffset: 1 } }, edition(lang)),
{ ...kitFonts(FONTS), text: TEXT[lang] });
};
const docs = [await build('ja'), await build(FACING)];
لكل لغة في هذا الموقع طبعتها من الصفحتين، مكتوبة في ملفها content.<lang>.md، وتقابل كل طبعة الأصل الياباني: يُدرج /* @content@ja */ الملف content.ja.md في كل طبعة، وتضع الصفحة اليابانية الأصل مقابل الحوار الإنجليزي. تُنضَّد الطبعة الصينية في أعمدة أيضًا، لأن الكتاب الذي يُفتح من اليمين لا يخلط الفقاعات العمودية بالأفقية؛ أما العربية فتُقرأ من اليمين إلى اليسار باتجاهها هي.
الوصفة كاملة
// ═══ Postext Cookbook · Nº 149 · Manga read right to left, lettered vertically ══════
// https://postext.dev/en/cookbook/manga-right-to-left
// Code: MIT · Story: written for the recipe (CC BY 4.0) · Pictures: generated with diffusion models
// Fonts: Zen Antique, Comic Neue and six more (SIL OFL 1.1) · Needs postext ≥ 1.65.0
// Two pages of a kendo manga: the Japanese original, then the same pages lettered again.
import {
buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage, loadVerticalAlternates,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'ar'; // @lang: this edition's language; the Japanese original faces it
const RECIPE = 'manga-right-to-left';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: black ink on a warm white, one screen-tone grey
const palette = {
ink: '#151413', // panel borders, balloon outlines, the lettering
paper: '#fdfcf9', // the page and the balloons
tone: '#e8e6e1', // the inner-voice box, a light screen tone
muted: '#6f6b64',
accent: '#a8322b', // the cover red (the Folio case in recipe.json)
};
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: 'ink (defaults)', value: { hex: palette.ink, model: 'hex' } },
];
// #endregion
// The engine's lettering and sound-effect faces per language (defaultComicFont and
// defaultComicSfxFont), written out so FONTS and the PDF know them.
const EDITIONS = {
ja: { locale: 'ja', faces: ['Zen Antique', 'Dela Gothic One'] },
en: { locale: 'en-us', faces: ['Comic Neue', 'Bangers'] },
es: { locale: 'es', faces: ['Comic Neue', 'Bangers'] },
ca: { locale: 'ca', faces: ['Comic Neue', 'Bangers'] },
pt: { locale: 'pt-BR', faces: ['Comic Neue', 'Bangers'] },
fr: { locale: 'fr', faces: ['Comic Neue', 'Bangers'] },
de: { locale: 'de', faces: ['Comic Neue', 'Bangers'] },
it: { locale: 'it', faces: ['Comic Neue', 'Bangers'] },
zh: { locale: 'zh-Hans', faces: ['Noto Sans SC', 'ZCOOL KuaiLe'] },
ar: { locale: 'ar', faces: ['Playpen Sans Arabic', 'Lalezar'] },
};
// #region answer: the art reads right to left, so every edition does
const comics = (lang) => ({
// The pages were drawn for right-to-left reading: panel 1 sits top right. The
// reading direction stays 'auto', which follows the art in a left-to-right
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
أخطاء شائعة
خطأ شائع
اوسم النص الياباني بـ 'ja'، لا بـ zh-Hans ولا بـ LANG
نسختا الوصفة هما en وes، لكن المثال الياباني ياباني في كلتيهما: `locale: LANG` سيسمه بالإنجليزية أو الإسبانية، والوسم الصيني سينضّده بالقواعد الصينية (ترقيم Kaiming، وكانا صغيرة يجوز أن تبدأ بها الأسطر، و图 بدل 図، وأشكال صينية للحروف في PDF). ومنذ postext 1.30 صار الوسم أيضًا اللغة التي يُشكَّل بها النص (يُقاس ويُرسم ويُضمَّن بها)، فكل وسم غير 'ja' يعطي أشكالًا للحروف غير اليابانية (الصينية منها مع وسم صيني) وكسرًا آخر للأسطر. اكتب 'ja': يختار منطقة اليابان (كسر الأسطر والترقيم وفق JLReq، ونقاط السمسم، وتوزيع الفوريغانا، وتسميتي 図 و表) ويوقف تقسيم الكلمات. ويُفشل الفحصُ نصًّا فيه كانا موسومًا بـ zh أو ko. كسر الأسطر الياباني (kinsoku) →
خطأ شائع
الخطوط الصينية تُحمَّل شرائح، عبر الكتلة cjk
يقدّم Fontsource العائلة الصينية أو اليابانية أو الكورية في نحو مئة ملف لكل وزن، يغطي كل منها نطاقًا من الحروف. لا يجلب loadFonts إلا ملف latin، فتأتي حروف الهان على الشاشة من خط النظام وتُقاس خطأً، ويسلّم fontsourceProvider ملف latin ذاك إلى PDF، فيطبعها مربعات فارغة. اذكر كتلة الأدوات cjk، واستدعِ loadCjkFonts(FONTS, markdown) بعد loadFonts (مرة لكل صوت، مع النص الذي يضعه، حين يستخدم الكتاب عدة خطوط CJK)، وأعطِ renderToPdf القيمة fontProvider: cjkPdfProvider: كلاهما يأخذ الملفات التي تحتوي حروف النص. الخطوط الصينية واليابانية والكورية →
- ضع أول من يتكلم في الإطار على اليمين. تتبع الفقاعات ترتيب القراءة، ولذلك يجعل النص الجملة الأولى في إطار التميمة لهانا الواقفة على اليمين. ولو تكلّم سورا أولًا لبقيت فقاعاته في جهته من الإطار، لكن الأعمدة اليابانية لا تترك تحتها مكانًا لردّ هانا، فيقف الردّ بجانبها على اليمين ويُقرأ أولًا.
- قد تخرج الفقاعة التي لا تتسع لها مساحة الإطار عن حدّه، ويُصدر المحرّك التحذير
comicBalloonOverflow. وسّع ذلك الإطار في التقسيم قبل أن تختصر الحوار. - الشخص الصغير الواقف في إطار طويل لا يترك بجانبه مكانًا لفقاعتين إحداهما فوق الأخرى: في إطار الباب كانت جملة المدرّب الثانية تغطيه من الصدر إلى الركبتين في الطبعات المكتوبة في سطور. نصوص هذه الطبعات تثبّت جملته الأولى بجانب رأسه (
mori{at="85% 19%"})، والجملة الموصولة بها تتبعها. والصفحة الصينية تكسر سطور فقاعة واحدة يدويًّا، بشرطة مائلة عكسية في آخر كل سطر، حيث كانت الأعمدة تقسم 其实 نصفين.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- 前の晩 (The Night Before), a two-page kendo manga written for this recipe, with its English, Spanish, Catalan, Chinese and Arabic letterings · Postext Cookbook · CC BY 4.0
- الصور
- The school's old wooden kendo dojo at dusk, its doors open and lit · Generated With Diffusion Models · أصلي
- Hana alone in the dojo, swinging her bamboo sword overhead · Generated With Diffusion Models · أصلي
- Sora peeking round the sliding door with a shrine charm · Generated With Diffusion Models · أصلي
- Close-up of Hana's sweating face · Generated With Diffusion Models · أصلي
- Sora holding out the charm to Hana · Generated With Diffusion Models · أصلي
- Coach Mori in the doorway, backlit, arms crossed · Generated With Diffusion Models · أصلي
- Close-up of Coach Mori's small smile · Generated With Diffusion Models · أصلي
- Hana tying the charm to her armour while Sora scratches his head · Generated With Diffusion Models · أصلي
- Hana and Sora on the school roof at sunset, seen from behind · Generated With Diffusion Models · أصلي
- الخطوط
- Zen Antique (SIL OFL 1.1) · Dela Gothic One (SIL OFL 1.1) · Comic Neue (SIL OFL 1.1) · Bangers (SIL OFL 1.1) · Noto Sans SC (SIL OFL 1.1) · ZCOOL KuaiLe (SIL OFL 1.1) · Playpen Sans Arabic (SIL OFL 1.1) · Lalezar (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


