Tabnine Logo
Font.getSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getSize
method
in
org.geotools.styling.Font

Best Java code snippets using org.geotools.styling.Font.getSize (Showing top 20 results out of 315)

origin: geotools/geotools

public FontBuilder reset() {
  Font df = sf.getDefaultFont();
  this.families = new ArrayList<Expression>();
  this.size = df.getSize();
  this.style = df.getStyle();
  this.weight = df.getWeight();
  return this;
}
origin: geotools/geotools

public FontBuilder reset(Font font) {
  if (font == null) {
    return reset();
  }
  this.families = font.getFamily() != null ? font.getFamily() : new ArrayList<Expression>();
  this.size = font.getSize();
  this.style = font.getStyle();
  this.weight = font.getWeight();
  unset = false;
  return this;
}
origin: geotools/geotools

Expression referenceSize = reference.getSize();
Expression referenceStyle = reference.getStyle();
Expression referenceWeight = reference.getWeight();
for (int i = 1; i < fonts.size(); i++) {
  Font f = fonts.get(i);
  Expression size = f.getSize();
  if (!expressionEquals(referenceSize, size, DEFAULT_FONT.getSize())) {
    return false;
origin: geotools/geotools

int size = ((Number) ((Literal) selectedFont.getSize()).getValue()).intValue();
sizeIndex = sizes.length - 1;
for (int index = 0; index < sizes.length; index++) {
origin: geotools/geotools

float size = evalToFloat(curr.getSize(), feature, 10);
origin: geotools/geotools

  @Override
  protected void encode(Font font) {
    putName("font-family", font.getFontFamily());
    put("font-size", font.getSize());
    putName("font-style", font.getStyle());
    putName("font-weight", font.getWeight());
  }
}
origin: geotools/geotools

/** Null safe copy of a single font */
protected Font copy(Font font) {
  if (font == null) return font;
  List<Expression> fontFamily = copyExpressions(font.getFamily());
  Expression fontStyle = copy(font.getStyle());
  Expression fontWeight = copy(font.getWeight());
  Expression fontSize = copy(font.getSize());
  Font copy = sf.font(fontFamily, fontStyle, fontWeight, fontSize);
  return copy;
}
origin: geotools/geotools

int textSize = getPositiveValue(font.getSize());
int delta = -1;
if (text.getLabelPlacement() instanceof PointPlacement) {
origin: geotools/geotools

@SuppressWarnings("deprecation")
@Test
public void font() throws Exception {
  List<Expression> family = new ArrayList<Expression>();
  family.add(ff.literal("ariel"));
  family.add(ff.literal("Helvetica"));
  family.add(ff.literal("sanserif"));
  Expression style = ff.literal("noraml");
  Expression weight = ff.literal("normal");
  Expression size = ff.literal(12);
  Font font = sf.font(family, style, weight, size);
  assertEquals(family, font.getFamily());
  assertEquals(style, font.getStyle()); // oblique or italic
  assertEquals(weight, font.getWeight()); // bold or normal
  assertEquals(size, font.getSize());
  assertSame(font.getFontStyle(), font.getStyle());
  assertSame(font.getFontFamily(), family.get(0));
  assertSame(font.getFontWeight(), font.getWeight());
  assertSame(font.getFontSize(), font.getSize());
  FontImpl cast = FontImpl.cast(font);
  assertSame(cast, font);
}
origin: geotools/geotools

    rescaledTextSymb.getFont().getSize().evaluate(null, Double.class);
PointPlacement rescaledPlacement =
    (PointPlacement) rescaledTextSymb.getLabelPlacement();
origin: geotools/geotools

if (font.getSize() != null) {
  font.getSize().accept(this, null);
origin: geotools/geotools

    rescaledTextSymb.getFont().getSize().evaluate(null, Double.class);
LinePlacement rescaledPlacement = (LinePlacement) rescaledTextSymb.getLabelPlacement();
double rescaledPerpOffset =
origin: geotools/geotools

  encodeCssParam("font-family", font.getFamily().get(0));
encodeCssParam("font-size", initialFont.getSize());
encodeCssParam("font-style", initialFont.getStyle());
encodeCssParam("font-weight", initialFont.getWeight());
  start("Font");
  encodeCssParam("font-family", font.getFamily().get(0));
  encodeCssParam("font-size", font.getSize());
  encodeCssParam("font-style", font.getStyle());
  encodeCssParam("font-weight", font.getWeight());
origin: geotools/geotools

if (font.getSize() != null) {
  font.getSize().accept(this, null);
origin: geotools/geotools

assertEquals(10, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
assertEquals("bold", Filters.asString(font.getWeight()));
origin: geotools/geotools

font.setSize(rescale(font.getSize()));
origin: geotools/geotools

font.setSize(rescale(font.getSize(), uom));
origin: geotools/geotools

assertEquals(12, Filters.asInt(font.getSize()));
assertEquals("bold", Filters.asString(font.getWeight()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: geotools/geotools

assertEquals(11, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
assertEquals("bold", Filters.asString(font.getWeight()));
origin: geotools/geotools

assertEquals(12, Filters.asInt(font.getSize()));
assertEquals("bold", Filters.asString(font.getWeight()));
assertEquals("normal", Filters.asString(font.getStyle()));
org.geotools.stylingFontgetSize

Javadoc

Font size in pixels with a default of 10 pixels.

Please note this is specified in pixels so you may need to take the resolution of your output into account when providing a size.

Popular methods of Font

  • getFamily
  • getStyle
  • getWeight
  • getFontFamily
  • getFontSize
  • getFontStyle
  • getFontWeight
  • setSize
  • setStyle
  • setFontFamily
  • setFontSize
  • setFontStyle
  • setFontSize,
  • setFontStyle,
  • setFontWeight,
  • setWeight

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • findViewById (Activity)
  • setContentView (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now