Skip to content

Releases: mihaelamj/MarkdownPDF

0.5.0

25 Jun 19:42

Choose a tag to compare

Added

  • Native charts truncate an over-wide series or category label with an ellipsis instead of failing the whole chart, so descriptive labels render in the PDF.
  • Mermaid flowcharts render dashed edges (-.->, plain and labeled) as dashed lines.
  • Mermaid flowcharts lay out cyclic graphs by breaking back-edges, so a flowchart with a cycle renders instead of falling back to source.

Changed

  • License changed from MIT to AGPL-3.0 (dual licensed; commercial option in COMMERCIAL.md). Versions published before this change remain under their original MIT terms.

0.4.2

07 Jun 04:33

Choose a tag to compare

Fold precomposed Unicode subscript/superscript characters (x₁, H₂O, xᵢ, n²) onto their base glyph when the embedded font lacks them, instead of aborting the render. Fixes #221.

MarkdownPDF 0.4.1

03 Jun 14:30

Choose a tag to compare

Fixed

  • A standalone image whose target cannot be resolved or decoded (a missing file,
    a site-absolute /assets/... path with no asset root, or an unsupported format
    such as SVG) no longer throws from render(markdown:) and fails the whole
    document. It now degrades to a visible [Image: alt] placeholder, the same way
    a remote image does, and the document still renders. Fixes #211.

MarkdownPDF 0.4.0

03 Jun 14:13

Choose a tag to compare

Changed

  • Render the full WinAnsi (Windows-1252) character set in the default base-14
    profile, with no embedded font. Accented Latin (é, ñ, ü, ç, ...), the
    CP1252 punctuation block (curly quotes, en/em dashes, NBSP, bullet), and
    common symbols (, £, ¢, ©, ®, , °, ±) now paint as their real
    glyphs instead of ?. Previously only printable ASCII (0x20-0x7E) rendered
    and everything else was replaced with a question mark. Content-stream literal
    strings now emit high bytes as octal escapes, the font /Widths cover the full
    32-255 range with AFM-derived advances, and the page /ActualText carries
    the original text. Characters beyond WinAnsi (CJK, complex scripts, color
    emoji) still fall back pending epic #210. First phase of #210.

MarkdownPDF 0.3.0

03 Jun 12:19

Choose a tag to compare

Changed

  • Restructure the repository as a pure, git-resolvable SwiftPM package, mirroring
    the MathTypeset layout: Package.swift at the repo root, Sources/, and
    Tests/. A consumer can now depend on it with
    .package(url: ".../MarkdownPDF.git"). One package, multiple MarkdownPDF*
    targets: the MarkdownPDF library, the MarkdownPDFLinux and MarkdownPDFMac
    renderer entry points, MarkdownPDFResume, and the engine documentation, with
    the full MarkdownPDFTests and MarkdownPDFResumeTests suites kept in the
    package (they @testable-import the engine, so they cannot live in a consumer).

Removed

  • The markdownpdf / resumepdf command-line executables and the Apps/ and
    Main.xcworkspace developer shell move to the separate MarkdownPDFCli repo,
    which consumes this package plus MathTypeset. The engine repo is now library-only.

MarkdownPDF 0.2.0

03 Jun 09:55

Choose a tag to compare

Added

  • Draw math symbols (operators, relations, Greek, arrows: \sum -> ∑, \pm ->
    ±, \sigma -> σ, and so on) with their real Unicode glyphs when the active
    embedded font covers them, falling back to the ASCII transliteration per
    symbol only where the font has a gap. Previously every symbol used the ASCII
    transliteration. The portable base-14 profile still renders all-ASCII (it
    covers no math glyphs), so its output is unchanged; an embedded math-capable
    font now matches a web/SVG render of the same source. Consumes the
    MathTypeset 0.5.0 unicodeWhereCovered symbol style, with the embedded
    font's cmap answering coverage.
  • Parse TeX horizontal spacing commands in math (\quad, \qquad, \,, \:,
    \;, \!, and \ ) through MathTypeset 0.6.0. Previously any of these forced
    the whole formula to fall back to visible source; the math-handbook showcase
    rows that use \qquad now typeset.
  • README gallery of real rendered PDF pages, a four-panel hero banner
    (multilingual text, native charts, a Mermaid diagram, and mathematics), and a
    dedicated Mathematics showcase cell drawn from the scientific-article fixture.

Changed

  • Tolerate a zero-height MuPDF line in the character-quad witness the same way
    the per-glyph check already does (#197): a line made only of legitimately tiny
    nested sub/superscript glyphs (a_{i,j}^{n+1}, 2^{2^{x}}) can report a
    zero-height quad. Only a clearly negative (flipped) line height is a defect;
    zero or negative width still fails.
  • Retire the completed child issues from the in-progress roadmap diagrams
    (Current Hardening and Math typesetting), keeping each diagram focused on the
    work that remains. Every epic stays visible as a node in the Epics overview.

MarkdownPDF 0.1.0

03 Jun 05:51

Choose a tag to compare

First tagged release of MarkdownPDF, a Pure Swift Markdown to PDF renderer for macOS and Linux. No browser engines, PDFKit, CoreGraphics, or C libraries; PDF bytes are serialized by hand.

Highlights

  • Markdown parser + PDF renderer + markdownpdf CLI; headings, lists, tables, images, links, block quotes, code blocks, themes, and an opt-in table of contents.
  • Embedded TrueType fonts (Type0 / CIDFontType2 / FontFile2 / ToUnicode) with correct CID /W and FontDescriptor scaling, so multilingual text (diacritic Latin, Cyrillic, Greek) renders identically across viewers and platforms.
  • Native vector charts, a portable Mermaid subset, and opt-in syntax coloring.
  • Opt-in TeX-math via the shared, dependency-free MathTypeset engine: inline and display math, scripts, fractions, scaling stroke radicals, and a documented subset.
  • A full visual witness battery (qpdf, Poppler pdftotext -tsv, MuPDF character quads, Poppler-vs-MuPDF raster) on embedded-font fixtures, plus a diverse multilingual showcase corpus rendered across US Letter, Legal, Tabloid, A3, and A5.

Verified on macOS and Linux against both CI fonts (DejaVu, Liberation).