Examples of PFont


Examples of processing.core.PFont

        (int) (this.materialWidth),
        (int) (this.materialHeight),
        a.PDF,
        "C:\\MyMedia\\sketchChair\\pdfOutput\\output"
            + functions.getFileName() + ".pdf");
    PFont font = a.createFont("Arial", this.textSize);
    pdf.textFont(font);
    pdf.textSize(this.textSize);

    pdf.beginDraw();
    //pdf.scale(pdf_pixels_per_mm );
View Full Code Here

Examples of processing.core.PFont

  public static void init(PApplet papplet) {
    System.out.println("[Font] init");
    for (int n = 0; n < FACES.length; n++) { //add all font names
      ArrayList<PFont> suitcase = new ArrayList<PFont>();
      for (int s = 0; s < SIZES.length; s++) { //add all sizes for each font
        PFont pfont = papplet.loadFont(PATH + FACES[n] + "-" + SIZES[s] + SUFFIX);
        grow2size(suitcase, SIZES[s]);
        suitcase.set(SIZES[s], pfont);
      }
      library.put(FACES[n], suitcase);
    }
View Full Code Here

Examples of processing.core.PFont

  public static void setFont(PApplet papplet, String face, int size) {
    if(!isInitialized) { init(papplet); }
   
    try {
      PFont pfont = (PFont) library.get(face).get(size); // pfonts.get(i);
      papplet.textFont(pfont);
      Font.face = face;
      Font.size = size;
    } catch(Exception e) {
      System.err.println("[Font] setToSize("+papplet+", "+size+") Exception: " + e.toString());
View Full Code Here

Examples of processing.core.PFont

    // add a bar scale to your map
    barScale = new BarScaleUI(this, map, 700, 20);

    // optionally style your bar scale
    PFont myFont = createFont("Monospaced", 12);
    barScale.setStyle(color(60, 120), 6, -2, myFont);
  }
View Full Code Here

Examples of processing.core.PFont

    Location locationLondon = new Location(51.5f, 0f);

    markerBerlin = new SimplePointMarker(locationBerlin);
    markerLondon = new SimplePointMarker(locationLondon);

    PFont font = createFont("serif-bold", 12);
    textFont(font);
  }
View Full Code Here

Examples of processing.core.PFont

      marker.setSelected(true);
    }
  }

  public List<Marker> createLabeledMarkers(List<Feature> features) {
    PFont font = loadFont("ui/OpenSans-12.vlw");
    List<Marker> markers = new ArrayList<Marker>();
    for (Feature feature : features) {
      String label = feature.getStringProperty("title");
      PointFeature pointFeature = (PointFeature) feature;
      Marker marker = new LabeledMarker(pointFeature.getLocation(), label, font, 15);
View Full Code Here

Examples of processing.core.PFont

        new Word("eight", 8) };

    float[] sizes = new float[] { 100, 80, 60 };
    float[] angles = new float[] { 0, 1, 2 };

    PFont pFont = mock(PFont.class);

    for (int i = 0; i < words.length; i++) {
      when(fonter.fontFor(words[i])).thenReturn(pFont);
      when(sizer.sizeFor(eq(words[i]), anyInt(), anyInt())).thenReturn(sizes[i]);
      when(angler.angleFor(words[i])).thenReturn(angles[i]);
View Full Code Here

Examples of processing.core.PFont

        for (int i = 0; i < maxNumberOfWords; i++) {
            Word word = words[i];
            EngineWord eWord = new EngineWord(word, i, words.length, bbTreeBuilder);

            PFont wordFont = word.getFont(fonter);
            float wordSize = word.getSize(sizer, i, words.length);
            float wordAngle = word.getAngle(angler);

            Shape shape = wordShaper.getShapeFor(eWord.word.word, wordFont, wordSize, wordAngle);
            if (isTooSmall(shape, renderOptions.minShapeSize)) {
View Full Code Here

Examples of processing.core.PFont

        modelOuterBounds = new Envelope(modelBounds);

        /* find and set up the appropriate font */
        String[] fonts = PFont.list();
        String[] preferredFonts = { "Mono", "Courier" };
        PFont font = null;
        for (String preferredFontName : preferredFonts) {
            for (String fontName : fonts) {
                if (fontName.contains(preferredFontName)) {
                    font = createFont(fontName, 16);
                    break;
View Full Code Here

Examples of processing.core.PFont

  {
  }

  protected float getTextHeight()
  {
    PFont font = menu.style.font;
    float fontSize = menu.style.fontSize;
    return UIUtils.getTextHeight(menu.buff, font, fontSize, name, true)
        + menu.style.padY * 2;
  }
 
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.