Package org.apache.fop.layout

Examples of org.apache.fop.layout.FontState


                             "font-size").getLength().mvalue();
            // font-variant support
            // added by Eric SCHAEFFER
            int fontVariant = this.parent.properties.get("font-variant").getEnum();

            this.fs = new FontState(area.getFontInfo(), fontFamily,
                                    fontStyle, fontWeight, fontSize, fontVariant);

            ColorType c =
              this.parent.properties.get("color").getColorType();
            this.red = c.red();
View Full Code Here


    public static int addText(BlockArea ba, FontState fontState, float red, float green,
                       float blue, int wrapOption, LinkSet ls,
                       int whiteSpaceCollapse, char data[], int start, int end,
                       TextState textState, int vAlign) {
      if (fontState.getFontVariant() == FontVariant.SMALL_CAPS) {
        FontState smallCapsFontState;
        try {
          int smallCapsFontHeight = (int) (((double) fontState.getFontSize()) * 0.8d);
          smallCapsFontState = new FontState(
            fontState.getFontInfo(),
            fontState.getFontFamily(),
            fontState.getFontStyle(),
            fontState.getFontWeight(),
            smallCapsFontHeight,
            FontVariant.NORMAL);
        } catch (FOPException ex) {
          smallCapsFontState = fontState;
          MessageHandler.errorln("Error creating small-caps FontState: " + ex.getMessage());
        }

        // parse text for upper/lower case and call addRealText
        char c;
        boolean isLowerCase;
        int caseStart;
        FontState fontStateToUse;
        for (int i = start; i < end; ) {
          caseStart = i;
          c = data[i];
          isLowerCase = (java.lang.Character.isLetter(c) && java.lang.Character.isLowerCase(c));
          while (isLowerCase == (java.lang.Character.isLetter(c) && java.lang.Character.isLowerCase(c))) {
View Full Code Here

      String fontWeight =
    this.properties.get("font-weight").getString();
      int fontSize =
    this.properties.get("font-size").getLength().mvalue();
     
      this.fs = new FontState(area.getFontInfo(), fontFamily,
            fontStyle, fontWeight, fontSize);
     
      this.align = this.properties.get("text-align").getEnum();
      this.alignLast =
    this.properties.get("text-align-last").getEnum();
View Full Code Here

      String fontWeight =
    this.properties.get("font-weight").getString();
      int fontSize =
    this.properties.get("font-size").getLength().mvalue();
   
      this.fs = new FontState(area.getFontInfo(), fontFamily,
            fontStyle, fontWeight, fontSize);

      // FIXME
      this.align = this.properties.get("text-align").getEnum();
View Full Code Here

      String fontWeight =
    this.properties.get("font-weight").getString();
      int fontSize =
    this.properties.get("font-size").getLength().mvalue();
     
      this.fs = new FontState(area.getFontInfo(), fontFamily,
            fontStyle, fontWeight, fontSize);
     
      this.align = this.properties.get("text-align").getEnum();
      this.alignLast =
    this.properties.get("text-align-last").getEnum();
View Full Code Here

      String fontWeight =
    this.properties.get("font-weight").getString();
      int fontSize =
    this.properties.get("font-size").getLength().mvalue();
   
      this.fs = new FontState(area.getFontInfo(), fontFamily,
            fontStyle, fontWeight, fontSize);

      // FIXME
      this.align = this.properties.get("text-align").getEnum();
View Full Code Here

  String fontFamily = this.properties.get("font-family").getString();
  String fontStyle = this.properties.get("font-style").getString();
  String fontWeight = this.properties.get("font-weight").getString();
  int fontSize = this.properties.get("font-size").getLength().mvalue();
   
  FontState fs = new FontState(area.getFontInfo(), fontFamily,
             fontStyle, fontWeight, fontSize);

  int align = this.properties.get("text-align").getEnum();
  int startIndent =
      this.properties.get("start-indent").getLength().mvalue();
View Full Code Here

      String fontWeight =
    this.parent.properties.get("font-weight").getString();
      int fontSize =
    this.parent.properties.get("font-size").getLength().mvalue();
     
      this.fs = new FontState(area.getFontInfo(), fontFamily, fontStyle,
            fontWeight, fontSize);
     
      ColorType c =
    this.parent.properties.get("color").getColorType();
      this.red = c.red();
View Full Code Here

            // NOTE: this is incomplete. font-size may be specified with
            // various kinds of keywords too
            int fontSize = properties.get("font-size").getLength().mvalue();
            int fontVariant = properties.get("font-variant").getEnum();
            // fontInfo is same for the whole FOP run but set in all FontState
            fontState = new FontState(fontInfo, fontFamily, fontStyle,
                                      fontWeight, fontSize, fontVariant);
        }
        return fontState;
    }
View Full Code Here

            int fontVariant =
                this.parent.properties.get("font-variant").getEnum();

            int letterSpacing =
                this.parent.properties.get("letter-spacing").getLength().mvalue();
            this.fs = new FontState(area.getFontInfo(), fontFamily,
                                    fontStyle, fontWeight, fontSize,
                                    fontVariant, letterSpacing);

            ColorType c = this.parent.properties.get("color").getColorType();
            this.red = c.red();
View Full Code Here

TOP

Related Classes of org.apache.fop.layout.FontState

Copyright © 2018 www.massapicom. 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.