باختصار
مجلة تصوير فيها طلاء مخملي على كل صفحة، وطلاء لامع على الصور والعنوان وحدها. الورنيش بلا لون، فتبدو الصفحة عادية على الشاشة؛ ويُظهر العرض ثلاثي الأبعاد وعرضٌ للتجربة الطباعية أين يقع.
ما الذي ستنضده
العدد 14 من Long Light، مجلة تصوير متخيَّلة: ست صفحات بمقاس 210 × 280 مم، بتجليد حراري. كل الصفحات مطلية بورنيش مخملي، وهو التشطيب الذي يطفئ الورقة ويذهب ببريقها. وفوق الصور الخمس واسم المجلة تضع المطبعة ورنيشًا ثانيًا لامعًا، فتلتقط الصور الضوء وتبقى الصفحة من حولها ساكنة. ولا لون لأيٍّ من الورنيشين: تعرض اللوحة الصفحات كما تُطبع، وتُظهر ثلاثة عروض للغلاف بجانب Folio الألواح واللمعان. ويفتح Folio المجلة على طاولة من الرخام تحت ضوء الاستوديو، حيث يلمع الورنيش اللامع حين تُقلب الورقة.
تجيب هذه الوصفة عن
- كيف أضع ورنيشًا مخمليًا على كل صفحة وورنيشًا لامعًا موضعيًا على الصور وحدها؟
الجواب المختصر
// A varnish is a spot ink: its own plate in the PDF, clear on screen. Soft touch goes over
// the whole sheet, the gloss over the pictures and the masthead. Both overprint by default,
// so neither cuts a hole in the colours under it. Each has a hex of its own all the same:
// a print render tells inks apart by their hex.
const varnish = (hex, name, sheen) => ({ hex, model: 'spot',
spot: { name, cmyk: { c: 0, m: 0, y: 0, k: 0 }, finish: { kind: 'varnish', sheen } } });
const palette = {
velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
gloss: varnish('#e4f0ee', 'Spot UV gloss', 'gloss'),
// The colours that print: a near-black, a slate for the bands, the paper.
ink: { hex: '#1d1d22', model: 'cmyk', cmyk: { c: 30, m: 20, y: 10, k: 95 } },
slate: { hex: '#262b3a', model: 'cmyk', cmyk: { c: 80, m: 65, y: 35, k: 60 } },
muted: { hex: '#6c6a70', model: 'cmyk', cmyk: { c: 0, m: 5, y: 0, k: 65 } },
paper: { hex: '#ffffff', model: 'hex' },
};
// The ink table names both varnishes as the order to the printer will.
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51', convertImages: false, inks: [
{ name: 'Soft-touch varnish', finish: { kind: 'varnish', sheen: 'softTouch' } },
{ name: 'Spot UV gloss', finish: { kind: 'varnish', sheen: 'gloss' } }] };
المكونات
- الميزات
- الأحبار الخاصةالألوان الخاصة وجدول الأحبارملفات PDF بنظام CMYK وبالتدرج الرماديعارض الكتاب ثلاثي الأبعاد (Folio)الورق والتجليد والمكتب والإضاءة (Folio)لوحة ألوان دلاليةالأغلفة وصفحات العنوان وبيانات النشرأنماط العناوينصفحات افتتاح مصمَّمةالنصوص والخطوط والمربعات في تصاميم الصفحةالصور في تصاميم الصفحةالترويسات وأرقام الصفحاتالتصدير إلى PDFصفحات على اللوحة (Canvas)
- تستخدم أيضًا
- سمات العنوانشريط فصل بعرض الصفحةلون الورقالخطوط المضمَّنة في PDFأنواع موارد مخصّصةالأشكال والجداول بوصفها مواردترويسات لكل قسمفصول بلا أرقام
- الخطوط
- Bodoni Moda, Source Serif 4, Source Sans 3 (SIL OFL 1.1)
- الأصول
dusk-560.jpgfog-800.jpgnets-1100.jpgroad-1100.jpgsaltflat-800.jpg- A walker on a salt flat at dusk, on the cover (Generated With Diffusion Models, أصلي)
- A fisherman mending a net (Generated With Diffusion Models, أصلي)
- Pines in morning fog (Generated With Diffusion Models, أصلي)
- A desert road between mesas (Generated With Diffusion Models, أصلي)
- The salt flat at sunset, on the back cover (Generated With Diffusion Models, أصلي)
طريقة التحضير
#1 · كل ورنيش لون خاص بتشطيب
الشيفرة هي الجواب المختصر أعلاه. الورنيش لون خاص تشطيبه varnish وله لمعة: softTouch للملمس المخملي، وgloss لورنيش UV الموضعي (التشطيبات). ويضع ملف PDF/X-4 كلًّا منهما في Separation خاص به، فتتسلم المطبعة لوحَي ورنيش بجانب ألواح الألوان الأساسية الأربعة. لا يرسم الورنيش شيئًا على الشاشة، لكنه يحتاج مع ذلك إلى قيمة hex خاصة به، لأن العرض الطباعي يميّز الأحبار بقيم hex. والورنيش يُطبع فوقيًا افتراضيًا، فلا يفرّغ أيٌّ منهما الألوان التي تحته.
#2 · لمسة مخملية على كل صفحة
// The page's footer carries it, so every page has it. A varnish goes down last on press, and
// nothing painted after it cuts it away. The cover and the back keep it alone.
const velvet = { kind: 'box', id: 'velvet', style: { backgroundColor: col('velvet') },
placement: at('bleed', 'top-left', 0, 0, { width: 'fill', height: 'fill' }) };
الورنيش المخملي صندوق واحد بلون الورنيش، من حافة القص إلى حافة القص. ويحمله التذييل، فتنال كل صفحة الصندوق من موضع واحد. وفي المطبعة يأتي الورنيش آخرًا فوق كل شيء، ولا يفرّغه في PDF شيء مما ترسمه الصفحة بعده: فيمكن أن يفتتح الصندوق الترويسة قبل النص وأرقام الصفحات، فتبقى هذه تحته على اللوح. ولا أرقام صفحات على الغلاف والغلاف الخلفي، فلا يحمل تذييلهما إلا الصندوق.
#3 · ورنيش لامع فوق الصور
// The gloss box comes after the picture, so it lies on top; being a varnish it paints
// nothing on the canvas, and in the PDF it overprints the picture on a plate of its own.
const glossed = (resourceId, placement, focus) => [
{ kind: 'image', id: 'photo', resourceId, fit: 'cover', placement, ...(focus && { focus }) },
{ kind: 'box', id: 'shine', style: { backgroundColor: col('gloss') }, placement },
];
كل صورة فوتوغرافية صورةٌ يوضع فوقها صندوق بالورنيش اللامع بالمقاس نفسه. يأتي الصندوق ثانيًا فيقع في الأعلى: هو على اللوح مستطيل يغطي الصورة تمامًا، وهكذا يُرسم لوح ورنيش UV الموضعي.
#4 · اسم المجلة منضود مرتين
const BAND = 222; // mm from the top of the bleed to the slate band
const masthead = (id, color) => text(id, '{titleText}', { fontFamily: DISPLAY, fontWeight: 700,
fontSize: pt(84), lineHeight: 0.9, align: 'center', color },
at('page', 'top-left', 0, 12, { width: mm(TRIM_W) }));
const cover = { id: 'cover', numbered: false, toc: false, span: 'page',
footer: { elements: [velvet] }, advancedDesign: { enabled: true, minHeight: mm(230),
slot: { elements: [
...glossed('saltflat', at('bleed', 'top-left', 0, 0, { width: 'fill',
height: mm(BAND + 3) }), { x: 0.5, y: 0.62 }),
{ kind: 'box', id: 'band', style: { backgroundColor: col('slate') },
placement: at('bleed', 'top-left', 0, BAND, { width: 'fill', height: mm(70) }) },
masthead('title', col('paper')), masthead('title-gloss', col('gloss')),
text('issue', '{attr.issue}', { ...label(8, col('paper')), align: 'center' },
at('page', 'top-left', 0, 46, { width: mm(TRIM_W) })),
text('lines', '{attr.lines}', { fontFamily: SERIF, fontSize: pt(12), lineHeight: 1.35,
color: col('paper') }, at('page', 'top-left', MARGIN.outer, BAND + 4,
{ width: mm(150) })),
] } } };
اسم المجلة عنصرا نص في الموضع نفسه: أحدهما بأبيض الورق، مفرَّغ من الصورة، والآخر بالورنيش اللامع فوقه. لا ترسم النسخة اللامعة شيئًا على الشاشة، وتعطي اللوح شكل الحروف، فيلمع العنوان على الغلاف المطبوع فوق سماء لامعة هي الأخرى.
#5 · عروض التشطيبات وFolio
// 'flat' paints the inks and leaves the varnish out; 'map' marks the special plates in false
// colour (varnish in cyan) over a faded page; 'sheen' sweeps a light across the page.
const views = document.createElement('section');
views.id = 'finish-views';
views.style.cssText = 'display: flex; gap: 16px; justify-content: center; padding: 16px';
const VIEWS = { flat: t({ en: 'As it prints', es: 'Como se imprime' }),
map: t({ en: 'The varnish plates', es: 'Las planchas de barniz' }),
sheen: t({ en: 'Under a raking light', es: 'Con luz rasante' }) };
for (const [finishes, name] of Object.entries(VIEWS)) {
const [figure, canvas, caption] = ['figure', 'canvas', 'figcaption']
.map((tag) => document.createElement(tag));
figure.style.margin = '0';
canvas.style.width = '260px';
canvas.setAttribute('role', 'img');
canvas.setAttribute('aria-label', `${t({ en: 'The cover', es: 'La cubierta' })}: ${name}`);
renderPageToCanvas(doc.pages[0], doc, canvas, { scale: 520 / doc.pages[0].width, finishes });
caption.textContent = name;
figure.append(canvas, caption);
views.append(figure);
}
document.getElementById('pages').before(views);
const folio = {
tilt: 26, yaw: -18,
paper: { type: 'coatedMatte', grammage: 150 },
binding: { type: 'paperback', cover: 'pages' },
surface: { type: 'marble' },
lighting: { environment: 'studio', intensity: 1.15 },
};
تقبل renderPageToCanvas خيار finishes. القيمة 'flat' هي الافتراضية وتُظهر الصفحة كما تُطبع؛ و'map' تُبهت الصفحة وتعلّم كل لوح خاص بلون زائف، الورنيش بالسماوي، واللامع أفتح من المخملي؛ و'sheen' تمرّر ضوءًا على الصفحة. ويقرأ Folio قناع التشطيبات نفسه: اللامع يلتقط الانعكاسات، والمخملي يمحوها.
الوصفة كاملة
// ═══ Postext Cookbook · Nº 192 · Spot gloss over a soft-touch magazine ═════════════════
// https://postext.dev/en/cookbook/spot-uv-photo-magazine
// Code: MIT · Text: original (CC BY 4.0) · Photographs: diffusion models
// Fonts: Bodoni Moda, Source Serif 4, Source Sans 3 (SIL OFL 1.1) · Needs postext ≥ 1.85.1
//
// A photography magazine whose pages are coated in a soft-touch varnish, with a gloss
// varnish laid over the photographs and the masthead only: the spot UV a printer sells as
// the contrast between a velvet page and a shining picture. Varnish puts no colour on the
// page, so the canvas shows the pages as they print and the finish views show the varnish.
import {
buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
import { createFolioFromDocument } from 'https://esm.sh/postext-folio';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'spot-uv-photo-magazine';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region answer: two varnishes, each a spot ink with a finish
// A varnish is a spot ink: its own plate in the PDF, clear on screen. Soft touch goes over
// the whole sheet, the gloss over the pictures and the masthead. Both overprint by default,
// so neither cuts a hole in the colours under it. Each has a hex of its own all the same:
// a print render tells inks apart by their hex.
const varnish = (hex, name, sheen) => ({ hex, model: 'spot',
spot: { name, cmyk: { c: 0, m: 0, y: 0, k: 0 }, finish: { kind: 'varnish', sheen } } });
const palette = {
velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
gloss: varnish('#e4f0ee', 'Spot UV gloss', 'gloss'),
// The colours that print: a near-black, a slate for the bands, the paper.
ink: { hex: '#1d1d22', model: 'cmyk', cmyk: { c: 30, m: 20, y: 10, k: 95 } },
slate: { hex: '#262b3a', model: 'cmyk', cmyk: { c: 80, m: 65, y: 35, k: 60 } },
muted: { hex: '#6c6a70', model: 'cmyk', cmyk: { c: 0, m: 5, y: 0, k: 65 } },
paper: { hex: '#ffffff', model: 'hex' },
};
// The ink table names both varnishes as the order to the printer will.
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51', convertImages: false, inks: [
{ name: 'Soft-touch varnish', finish: { kind: 'varnish', sheen: 'softTouch' } },
{ name: 'Spot UV gloss', finish: { kind: 'varnish', sheen: 'gloss' } }] };
// #endregion
const col = (id) => ({ ...palette[id], paletteId: id });
const colorPalette = [...Object.entries(palette).map(([id, value]) => ({ id, name: id, value })),
{ id: 'main-color', name: 'ink (defaults)', value: palette.ink }];
const [TRIM_W, TRIM_H] = [210, 280];
const MARGIN = { top: 18, bottom: 20, inner: 18, outer: 16 };
const LEAD = 13.6; // pt
const [DISPLAY, SERIF, SANS] = ['Bodoni Moda', 'Source Serif 4', 'Source Sans 3'];
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#مطفأ بدل المخملي
الورنيش المطفأ العادي أرخص، ويعطي التباين نفسه بعمق أقل قليلًا.
- velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
+ velvet: varnish('#e9e4f0', 'Matte varnish', 'matte'),#لمعان على الحروف وحدها
اترك الصور مطفأة وضع اللامع على اسم المجلة والعناوين وحدها: انضد العناوين مرتين كما نُضد اسم المجلة، واحذف الصناديق التي فوق الصور.
أخطاء شائعة
- الورنيش الذي يحمل قيمة hex للون آخر يُطبع بذلك اللون. أعطِ كل ورنيش قيمة hex لا يستعملها شيء آخر.
- الورنيش الذي يغطي الصفحة كلها إن توقف عند مقاس الصفحة النهائي ترك شريطًا بلا ورنيش على الحافة إذا قُصّت الورقة مائلة قليلًا. مدّه حتى حافة القص، كما يفعل الصندوق هنا.
- كثيرًا ما يُباع الملمس المخملي سلفنةً لا ورنيشًا. اسأل المطبعة عن اسم اللوح الذي تريده، وحدّده بـ
pdfNameفي جدول الأحبار.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الصور
- A walker on a salt flat at dusk, on the cover · Generated With Diffusion Models · أصلي
- A fisherman mending a net · Generated With Diffusion Models · أصلي
- Pines in morning fog · Generated With Diffusion Models · أصلي
- A desert road between mesas · Generated With Diffusion Models · أصلي
- The salt flat at sunset, on the back cover · Generated With Diffusion Models · أصلي
- الخطوط
- Bodoni Moda (SIL OFL 1.1) · Source Serif 4 (SIL OFL 1.1) · Source Sans 3 (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


