Examples of BufferedDataSource


Examples of com.adobe.dp.epub.io.BufferedDataSource

    Enumeration list = subsetters.keys();
    while (list.hasMoreElements()) {
      FontEntry entry = (FontEntry) list.nextElement();
      if (!entry.subsetter.used)
        continue;
      BufferedDataSource bds = new BufferedDataSource();
      try {
        OpenTypeFont font = entry.subsetter.font;
        String resName = entry.familyName.replaceAll(" ", "-") + "-" + entry.weight;
        switch (entry.style) {
        case FontPropertyConstants.STYLE_ITALIC:
          resName += "-Italic";
          break;
        case FontPropertyConstants.STYLE_OBLIQUE:
          resName += "-Oblique";
          break;
        }
        String primaryUUID = epub.getPrimaryIdentifier();
        if (primaryUUID != null && primaryUUID.startsWith("urn:uuid:")) {
          resName = resName + "-" + primaryUUID.substring(9);
        }
        bds.getOutputStream().write(font.getSubsettedFont());
        String folder = epub.getContentFolder() == null ? "" : epub.getContentFolder() + "/";
        FontResource fontResource = epub.createFontResource(folder + "fonts/" + resName + ".otf", bds);
        FontFaceRule face = styleResource.getStylesheet().createFontFace(fontResource);
        face.set("font-family", new CSSQuotedString(entry.familyName));
        switch (entry.weight) {
View Full Code Here

Examples of simtools.data.buffer.BufferedDataSource

        }
        buffer.setProvider(ds);
        // temporary stop notification => can remove and add safely
        setNotify(false);
        if (sources.remove(ds)) { // true if it was present
            DataSource ret = new BufferedDataSource(buffer);
            sources.add(ret);
            // reactivate notification and send a 'change' message
            setNotify(true);
            notifyListeners(DataSourcePoolEvent.CHANGE, ret, ds);
            return ret;
View Full Code Here

Examples of simtools.data.buffer.BufferedDataSource

        if ((b.getProvider() != null) && (!b.getProvider().equals(get(i)))) {
            throw new UnsupportedOperation();
        }
        b.setProvider((ValueProvider) get(i));
        // this will in turn call back attachBuffer
        set(i, new BufferedDataSource(b));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.