Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ follow semantic versioning; release dates are ISO 8601.

### Fixed

- **The example catalogue renders the weights it declares.** The same defect the donut
KPI had, 138 times over in the examples: a font *face* constant named with no
decoration, which the library rewrites to its base family before the lookup. The PPTX
backend began reading the face from the decoration in the 2.1 line, so decks that had
rendered bold went out regular — a live loss on `develop`, invisible because nothing
re-rendered the committed previews to show it. Restoring the weights changed four
decks back and gave a fifth the emphasis it had always asked for. Thirty-one committed
previews and the README hero are re-rendered; the weekly schedule's columns are recomputed to fill the
printable width, because bold day notes no longer fit a span over fixed sub-columns and
a spanned cell cannot borrow width from them.
- **The donut-centre KPI renders the weight it declares.** A style names a font
*family* and a *decoration*, and the decoration is what picks the face within the
family — the standard-14 face constants (`HELVETICA_BOLD`, `TIMES_ITALIC`, …) are
Expand Down
Binary file modified assets/readme/examples/barcode-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/business-report.pdf
Binary file not shown.
Binary file modified assets/readme/examples/business-report.pptx
Binary file not shown.
Binary file modified assets/readme/examples/canvas-layer-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/composed-table-cell-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/cover-letter.pdf
Binary file not shown.
Binary file modified assets/readme/examples/emoji-shortcodes.pdf
Binary file not shown.
Binary file modified assets/readme/examples/engine-deck-v2.pdf
Binary file not shown.
Binary file modified assets/readme/examples/engine-deck.pdf
Binary file not shown.
Binary file modified assets/readme/examples/feature-catalog.pdf
Binary file not shown.
Binary file modified assets/readme/examples/financial-report.pdf
Binary file not shown.
Binary file modified assets/readme/examples/financial-report.pptx
Binary file not shown.
Binary file modified assets/readme/examples/inline-code-column-wrap.pdf
Binary file not shown.
Binary file modified assets/readme/examples/inline-highlight-chips.pdf
Binary file not shown.
Binary file modified assets/readme/examples/inline-shapes.pdf
Binary file not shown.
Binary file modified assets/readme/examples/inline-svg-icons.pdf
Binary file not shown.
Binary file modified assets/readme/examples/invoice-cinematic.pdf
Binary file not shown.
Binary file modified assets/readme/examples/invoice-http-stream.pdf
Binary file not shown.
Binary file modified assets/readme/examples/invoice-snapshot-regression.pdf
Binary file not shown.
Binary file modified assets/readme/examples/master-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/master-showcase.pptx
Binary file not shown.
Binary file modified assets/readme/examples/maven-banner.pdf
Binary file not shown.
Binary file modified assets/readme/examples/maven-banner.pptx
Binary file not shown.
Binary file modified assets/readme/examples/nested-list-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/pdf-chrome.pdf
Binary file not shown.
Binary file modified assets/readme/examples/rich-text-showcase.pdf
Binary file not shown.
Binary file modified assets/readme/examples/section-presets.pdf
Binary file not shown.
Binary file modified assets/readme/examples/twin-output.pdf
Binary file not shown.
Binary file modified assets/readme/examples/twin-output.pptx
Binary file not shown.
Binary file modified assets/readme/examples/weekly-schedule.pdf
Binary file not shown.
Binary file modified assets/readme/examples/word-export-companion.pdf
Binary file not shown.
Binary file modified assets/readme/repository_showcase_render.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.demcha.compose.document.style.DocumentColor;
import com.demcha.compose.document.style.DocumentInsets;
import com.demcha.compose.document.style.DocumentStroke;
import com.demcha.compose.document.style.DocumentTextDecoration;
import com.demcha.compose.document.style.DocumentTextStyle;
import com.demcha.examples.support.theme.BusinessTheme;
import com.demcha.compose.font.FontName;
Expand Down Expand Up @@ -176,7 +177,8 @@ private static void barcodeCard(com.demcha.compose.document.dsl.SectionBuilder s
.addParagraph(p -> p
.text(title)
.textStyle(DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD)
.size(11)
.color(INK)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("features/canvas", "canvas-layer-showcase.pdf");

DocumentTextStyle eyebrow = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(10)
.color(ACCENT)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle headline = DocumentTextStyle.builder()
.fontName(FontName.TIMES_BOLD)
.fontName(FontName.TIMES_ROMAN)
.size(34)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
Expand All @@ -66,7 +66,8 @@ public static Path generate() throws Exception {
.color(MUTED)
.build();
DocumentTextStyle name = DocumentTextStyle.builder()
.fontName(FontName.TIMES_ITALIC)
.fontName(FontName.TIMES_ROMAN)
.decoration(DocumentTextDecoration.ITALIC)
.size(24)
.color(INK)
.build();
Expand All @@ -76,7 +77,7 @@ public static Path generate() throws Exception {
.color(INK)
.build();
DocumentTextStyle sealLabel = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(9)
.color(ACCENT)
.decoration(DocumentTextDecoration.BOLD)
Expand All @@ -87,13 +88,14 @@ public static Path generate() throws Exception {
.color(MUTED)
.build();
DocumentTextStyle title = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(15)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle caption = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_OBLIQUE)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.ITALIC)
.size(10)
.color(MUTED)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.demcha.compose.document.output.DocumentWatermarkPosition;
import com.demcha.compose.document.style.DocumentColor;
import com.demcha.compose.document.style.DocumentInsets;
import com.demcha.compose.document.style.DocumentTextDecoration;
import com.demcha.compose.document.style.DocumentTextStyle;
import com.demcha.examples.support.theme.BusinessTheme;
import com.demcha.compose.font.FontName;
Expand Down Expand Up @@ -253,7 +254,8 @@ public static void main(String[] args) throws Exception {

private static DocumentTextStyle panelHeadline() {
return DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD)
.size(11)
.color(INK)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public static Path generate() throws Exception {
Path docxFile = ExampleOutputPaths.prepare("features/docx", "word-export-companion.docx");

DocumentTextStyle title = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(20)
.color(NAVY)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle heading = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(13)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
Expand All @@ -76,7 +76,8 @@ public static Path generate() throws Exception {
.color(INK)
.build();
DocumentTextStyle caption = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_OBLIQUE)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.ITALIC)
.size(10)
.color(MUTED)
.build();
Expand Down Expand Up @@ -170,7 +171,8 @@ public static Path generate() throws Exception {
.center(new com.demcha.compose.document.dsl.ParagraphBuilder()
.text("GC")
.textStyle(DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD).size(20)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD).size(20)
.color(DocumentColor.WHITE).build())
.align(com.demcha.compose.document.node.TextAlign.CENTER)
.build()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@ public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("features/lists", "nested-list-showcase.pdf");

DocumentTextStyle title = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(20)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle sectionHeading = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(13)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle caption = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_OBLIQUE)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.ITALIC)
.size(10)
.color(MUTED)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public static Path generate() throws Exception {
.name("InitialCircle")
.padding(12)
.stroke(DocumentStroke.of(GOLD, 1.4))
.center(label("GC", style(FontName.HELVETICA_BOLD, 24,
.center(label("GC", style(FontName.HELVETICA, 24,
DocumentTextDecoration.BOLD, DocumentColor.WHITE)))
.position(label("CLIP", style(FontName.HELVETICA_BOLD, 8,
.position(label("CLIP", style(FontName.HELVETICA, 8,
DocumentTextDecoration.BOLD, SOFT_GOLD)),
0, -12, LayerAlign.BOTTOM_CENTER))
.addParagraph(paragraph -> paragraph
Expand All @@ -86,10 +86,10 @@ public static Path generate() throws Exception {
.name("OffsetEllipse")
.padding(10)
.stroke(DocumentStroke.of(DEEP_TEAL, 1.0))
.center(label("Overlay", style(FontName.HELVETICA_BOLD, 15,
.center(label("Overlay", style(FontName.HELVETICA, 15,
DocumentTextDecoration.BOLD, INK)))
.topRight(pill(44, 18, DEEP_TEAL))
.position(label("TOP", style(FontName.HELVETICA_BOLD, 7,
.position(label("TOP", style(FontName.HELVETICA, 7,
DocumentTextDecoration.BOLD, DocumentColor.WHITE)),
-6, 5, LayerAlign.TOP_RIGHT))
.addParagraph(paragraph -> paragraph
Expand All @@ -108,7 +108,7 @@ public static Path generate() throws Exception {
.padding(12)
.center(cardCopy())
.topRight(pill(46, 18, DEEP_TEAL))
.position(label("NEW", style(FontName.HELVETICA_BOLD, 7,
.position(label("NEW", style(FontName.HELVETICA, 7,
DocumentTextDecoration.BOLD, DocumentColor.WHITE)),
-6, 5, LayerAlign.TOP_RIGHT))
.addParagraph(paragraph -> paragraph
Expand Down Expand Up @@ -217,7 +217,7 @@ private static DocumentNode seatGuide() {
private static DocumentNode valignLabel(String text, TextVerticalAlign verticalAlign) {
return new ParagraphBuilder()
.text(text)
.textStyle(style(FontName.HELVETICA_BOLD, 34, DocumentTextDecoration.BOLD, DocumentColor.WHITE))
.textStyle(style(FontName.HELVETICA, 34, DocumentTextDecoration.BOLD, DocumentColor.WHITE))
.align(TextAlign.CENTER)
.verticalAlign(verticalAlign)
.margin(DocumentInsets.zero())
Expand All @@ -240,7 +240,7 @@ private static void cornerCard(SectionBuilder col, String caption, DocumentCorne
.roundedRect(96, 56, corners)
.fillColor(DEEP_TEAL)
.clipPolicy(ClipPolicy.CLIP_PATH)
.center(label("Aa", style(FontName.HELVETICA_BOLD, 16,
.center(label("Aa", style(FontName.HELVETICA, 16,
DocumentTextDecoration.BOLD, DocumentColor.WHITE))))
.addParagraph(paragraph -> paragraph
.text(caption)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public final class SvgIconGalleryExample {
private static final DocumentColor MUTED = DocumentColor.rgb(90, 96, 105);

private static final DocumentTextStyle LABEL_STYLE = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(6.4)
.decoration(DocumentTextDecoration.BOLD)
.color(LABEL_INK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,20 @@ public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("features/tables", "composed-table-cell-showcase.pdf");

DocumentTextStyle title = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(20)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle sectionHeading = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(13)
.color(INK)
.decoration(DocumentTextDecoration.BOLD)
.build();
DocumentTextStyle caption = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_OBLIQUE)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.ITALIC)
.size(10)
.color(MUTED)
.build();
Expand All @@ -75,7 +76,7 @@ public static Path generate() throws Exception {
.color(INK)
.build();
DocumentTextStyle headerText = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.size(11)
.color(DocumentColor.WHITE)
.decoration(DocumentTextDecoration.BOLD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("features/tables", "inline-code-column-wrap.pdf");

DocumentTextStyle title = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD).size(20).color(INK)
.fontName(FontName.HELVETICA).size(20).color(INK)
.decoration(DocumentTextDecoration.BOLD).build();
DocumentTextStyle caption = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_OBLIQUE).size(10).color(MUTED).build();
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.ITALIC).size(10).color(MUTED).build();
DocumentTextStyle body = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA).size(10.5).color(INK).build();
DocumentTextStyle headerText = DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD).size(11).color(DocumentColor.WHITE)
.fontName(FontName.HELVETICA).size(11).color(DocumentColor.WHITE)
.decoration(DocumentTextDecoration.BOLD).build();

DocumentTableStyle headerStyle = DocumentTableStyle.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static Path generate() throws Exception {
.stroke(DocumentStroke.of(RULE, 0.6))
.padding(DocumentInsets.of(8))
.textStyle(DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD)
.color(DocumentColor.WHITE)
.build())
Expand All @@ -69,7 +69,7 @@ public static Path generate() throws Exception {
.stroke(DocumentStroke.of(RULE, 0.6))
.padding(DocumentInsets.of(8))
.textStyle(DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD)
.color(INK)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static Path generate() throws Exception {
.fillColor(HEADER_FILL)
.stroke(DocumentStroke.of(RULE, 0.5))
.padding(DocumentInsets.of(6))
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA_BOLD)
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD).color(DocumentColor.WHITE).build())
.build();

Expand All @@ -103,7 +103,7 @@ public static Path generate() throws Exception {
.spacing(8)
.addParagraph(p -> p
.text("Emoji using SVG clip-path (" + entries.size() + " glyphs)")
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA_BOLD)
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA).decoration(DocumentTextDecoration.BOLD)
.size(14).color(INK).build())
.margin(DocumentInsets.zero()))
.addParagraph(p -> p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.demcha.compose.document.api.DocumentSession;
import com.demcha.compose.document.style.DocumentColor;
import com.demcha.compose.document.style.DocumentInsets;
import com.demcha.compose.document.style.DocumentTextDecoration;
import com.demcha.compose.document.style.DocumentTextStyle;
import com.demcha.compose.document.svg.SvgIcon;
import com.demcha.compose.font.FontName;
Expand Down Expand Up @@ -45,7 +46,7 @@ public static Path generate() throws Exception {
var flow = document.pageFlow().name("EmojiGallery").spacing(6);
flow.addParagraph(p -> p
.text("Noto Emoji — full set (" + glyphs.size() + " glyphs)")
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA_BOLD)
.textStyle(DocumentTextStyle.builder().fontName(FontName.HELVETICA).decoration(DocumentTextDecoration.BOLD)
.size(15).color(INK).build())
.margin(DocumentInsets.zero()));
flow.addParagraph(p -> p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.demcha.compose.document.dsl.SectionBuilder;
import com.demcha.compose.document.style.DocumentColor;
import com.demcha.compose.document.style.DocumentInsets;
import com.demcha.compose.document.style.DocumentTextDecoration;
import com.demcha.compose.document.style.DocumentTextStyle;
import com.demcha.examples.support.theme.BusinessTheme;
import com.demcha.compose.font.FontName;
Expand Down Expand Up @@ -142,7 +143,8 @@ private static void labelledRow(SectionBuilder section, String label, Consumer<R

private static DocumentTextStyle caption() {
return DocumentTextStyle.builder()
.fontName(FontName.HELVETICA_BOLD)
.fontName(FontName.HELVETICA)
.decoration(DocumentTextDecoration.BOLD)
.size(8.5)
.color(MUTED)
.build();
Expand Down
Loading
Loading