Skip to content

slide-maker 6.4.0 — decks in nine languages: language tags, complex-script fonts, right-to-left

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 14:27

Russian, Arabic, Hindi, Thai and more: language tags read from every major script, a complex-script font, right-to-left paragraphs.

  • The language tag is now read for Russian / Ukrainian, Arabic / Persian / Urdu, Hebrew, Hindi, Thai, Greek,
    Vietnamese and German too.
  • deckkit.CSFONT sets the font for Arabic, Hebrew, Devanagari and Thai text (<a:cs> on every run, and the theme's
    script slots); new lint warning CS_NO_FONT names the face when such text has none. Measured: a Hindi deck's title
    and body came out in two different designs from the renderer's fallback.
  • Arabic and Hebrew paragraphs save right to left (rtl="1", right-aligned where they were left), and bullet()
    puts the marker on the right for them. Before, an Arabic paragraph was left-aligned with its full stop at the start
    of the line. The layout itself (accent rules, chart and table order) is not mirrored.
  • deck_gates.py interview --lang ru|ar.
  • English and Chinese decks are unchanged byte for byte.

Languages beyond English and Chinese: the deck's language tag, French spacing, Japanese faces, a seven-language interview.

  • A deck saves with its language on every run (lang="fr-FR", "ja-JP" …), read from its text (Chinese, Japanese,
    Korean, French, Spanish, Portuguese) or set with deckkit.LANG. Every run used to inherit en-US from the stock
    parts, so PowerPoint spell-checked a French or Spanish deck as English. English decks are unchanged byte for byte;
    Chinese decks render pixel-identically.
  • A French deck gets a non-breaking space before ; : ! ? » and after «, so the mark never starts a line.
  • New lint warning JA_IN_CHINESE_FACE: Japanese text set in a Chinese face (e.g. Hiragino Sans GB) renders with
    low, small kana and Chinese kanji shapes; it names the Japanese face. The theme's Japanese and Korean font slots
    now carry the deck's East-Asian face.
  • deck_gates.py interview --lang prints the four questions in Japanese, Korean, Spanish, Portuguese and French too.

A from-scratch deck saves with its own theme and master (New Slide in PowerPoint matches the deck).

  • It used to ship on python-pptx's stock Office theme
    (Calibri, Office-blue accent) with a 4:3 master, so in PowerPoint a New Slide came out Calibri on Office blue with
    its body placeholder running off a 16:9 page, an inserted chart or shape took the Office palette, and Design >
    Variants recoloured nothing. Saving a blank_deck() deck now writes the look the slides already have into the
    theme (ground and ink, six accents by use, heading and body faces including East Asian) and the master (title and
    body sizes, title alignment and weight, background), and stretches the master and layouts to the canvas. The slides
    are not touched: renders of the example and visual-language sample decks are pixel-identical before and after.
    Decks opened from a template keep their own theme.
  • text() / set_font() take a colour as an RGBColor, 'RRGGBB' hex or an (r, g, b) tuple, like box(); anything
    else is refused with a message that says what a colour can be (a tuple used to fail as "assigned value must be type RGBColor").

Every genre's playbook audited against its sources, and detail floors for all genres.

  • Each playbook rule now traces to a named source, is corrected where the source said otherwise (investor deck size by
    use; Sequoia vs Kawasaki attribution; builds used sparingly in a research talk; the all-hands "wow" moment optional;
    what student presentations are actually graded on), or is labelled a house rule. ~40 sourced detail rules added
    (RAG legend and colour words; units and one highlight colour on exec charts; client accountabilities and payment
    terms; RQ labels and slide numbers in a defense; monthly, labelled traction charts; dated metrics; image credits).
  • Fixes from two end-to-end test builds (an English investor pitch, a Chinese student presentation): a bare
    slide count is stored with its unit; --fast freshens unchanged PNGs so the blind-read packet accepts them; the
    design plan is kept in <deck>/.slide-maker/ so the gate survives a wiped scratchpad; source_check never
    auto-records a number inside a sentence as a rescaled figure; the design dispatch follows the derived boldness
    instead of hardcoding BOLD; a review may name playbook: <genre> as its overlay; picks exits 0 after a
    successful write; directions.json is kept at the deck root; a fast round under auto with majors open runs
    one more round automatically; detail-floor sizes are canvas-relative; the generic example uses slide_background.
  • Second round from the two test builds and a user review: CUT_UNIT (a declared bleed that slices one unit of a
    repeated row is overflow, not bleed); grouped author-year markers (A, 2019; B, 2020) are parsed, in ASCII or full-width punctuation;
    reference lines keep "et al." for Latin-script works in a Chinese deck (GB/T 7714) and add no full stop after
    ?/!; reference_page heading follows y, takes w=, uses the body face for CJK and measures rows with
    measure_text; HEADLINE_CROWDED picks the largest FONT, not the tallest block (_max_font_pt never existed);
    the contrast backing composites translucent fills; the file-level text height reads line spacing; stat_row
    captions scale with the canvas; the design dispatch asks the art director for the material probe.
  • DETAIL_FLOORS, printed with every brief: mark tight, one face per kind, results on the slide, reproducible from
    the screen, readable floor, decodable marks, scale by role, colour never the only signal.

Formulas at reading size, answers marked where they are named (feedback on the first real lesson deck).

  • New build-time warning FORMULA_OVERSIZE: an equation_omml / equation_native formula set past 44pt (the
    title's size). Equations now carry their effective size in the shape name so this is decidable.
  • The teaching playbook and the art director's hero rule: the hero is a number or words, never a formula; an
    answer is revealed by a tight mark on the option's label, not a ring round a whole drawing.
  • prompt_card refuses a box too short for its prompt and names the height it needs.
  • Teaching / training: "discuss first, then reveal" — every check and activity slide shows its answer on the slide
    on the click after the room commits, even when animation was declined (then on the next slide); answers that live
    only in the speaker notes are a named failure mode. The interview's builds question carries this carve.
  • One face per slide for formulas: equation_omml's fallback math face now follows the deck's body face (sans deck →
    STIX Sans, serif deck → Computer Modern) and the teaching playbook asks for every formula on a slide as an equation object.
  • check_question sizes its revealed explanation to the text at 16pt instead of shrinking it to ~11pt;
    preflight_check counts a component that stages its own reveal (build=b) as a Build step.

Genres: a playbook for every everyday deck, and checks that make a lesson a lesson.

  • purposes.py carries a playbook per genre — arc, content rules, design conventions (applied inside the
    chosen look, never instead of it), failure modes and sources — printed by purposes.py --brief "<purpose>"
    and automatically when deck_gates.py picks --set purpose=… records it, so every runtime plans from it.
  • Five new genres: student presentation, client proposal, investor pitch, training/onboarding, all-hands/keynote.
    Teaching gains a check for understanding section and an age-band question; work status gains risks;
    the pitch gains proof and next step. Everyday wording now binds in English and Chinese (class presentation, fundraising
    roadshow, annual meeting, new-hire training, client proposal, sales pitch …), where before it bound nothing and went unchecked.
  • New components check_question (choose, answer revealed on the next click) and prompt_card
    (try · predict · discuss · think-pair-share), themed by whatever direction the deck uses.

Toolchain: editable 2-D equations, vector icons, lighter photos, PyMuPDF 2.x.

  • equation_omml(): fractions, roots, big operators with limits, \left…\right and \binom go in as a
    real PowerPoint equation (OMML, click-editable) with the equation_png picture as its mc:Fallback.
    LibreOffice (≥24.2.7) shows the fallback, so the render loop and the PDF are unchanged.
  • Icons: icon_png() keeps the recoloured SVG beside the PNG and picture() embeds it as asvg:svgBlip
    (PNG fallback) — sharp at any size in PowerPoint 2019+/365 and LibreOffice 24.2+. Gradient icons stay
    PNG-only. New render finding SVG BLANK IN RENDER (LibreOffice tdf#172094); deckkit.SVG_ICONS = False
    turns the vector off.
  • picture() stores a JPEG/PNG over 1 MP at 300 ppi of its shown size (max_ppi=None keeps it): a
    6000 px camera photo in a 4 in frame goes from 20 MB to 0.3 MB.
  • import pymupdf replaces import fitz (a FutureWarning from PyMuPDF 2.0); floor PyMuPDF ≥ 1.24.3.
  • Icon rasterizing via headless Chrome: Chrome 158 on macOS writes the screenshot and then exits 2 in teardown,
    which threw every icon away when cairosvg/rsvg-convert were absent; the fresh, inked PNG is now the verdict.

Full changelog: https://github.com/addsumtech/slides_maker/blob/main/CHANGELOG.md