All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.openhtmltopdf.outputdevice.helper.AddedFont Maven / Gradle / Ivy

Go to download

Open HTML to PDF is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code.

There is a newer version: 1.0.10
Show newest version
package com.openhtmltopdf.outputdevice.helper;

import java.io.File;
import java.io.InputStream;

import com.openhtmltopdf.extend.FSSupplier;
import com.openhtmltopdf.outputdevice.helper.BaseRendererBuilder.FontStyle;

public class AddedFont {
    public final FSSupplier supplier;
    public final File fontFile;
    public final Integer weight;
    public final String family;
    public final boolean subset;
    public final FontStyle style;
    public final Object pdfontSupplier; // Bit of a hack, not type-safe!

    public AddedFont(FSSupplier supplier, File fontFile, Integer weight, String family, boolean subset,
            FontStyle style) {
        this.supplier = supplier;
        this.fontFile = fontFile;
        this.pdfontSupplier = null;
        this.weight = weight;
        this.family = family;
        this.subset = subset;
        this.style = style;
    }

    public AddedFont(Object pdfontSupplier, Integer weight, String family, boolean subset, FontStyle style) {
        this.supplier = null;
        this.fontFile = null;
        this.pdfontSupplier = pdfontSupplier;
        this.weight = weight;
        this.family = family;
        this.subset = subset;
        this.style = style;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy