Returns the icon's width. This is a cover methods for <code>
getIconWidth(null)</code>.

@param  context the SynthContext describing the component/region, the
style, and the state.

@return an int specifying the fixed width of the icon.
186729
@Override
    public int getIconWidth(SynthContext context) {
        if (context == null) {
            return width;
        }

        JComponent c = context.getComponent();

        if (c instanceof JToolBar && ((JToolBar) c).getOrientation() == JToolBar.VERTICAL) {

            // we only do the -1 hack for UIResource borders, assuming
            // that the border is probably going to be our border
            if (c.getBorder() instanceof UIResource) {
                return c.getWidth() - 1;
            } else {
                return c.getWidth();
            }
        } else {
            return scale(context, width);
        }
    }
827185
def OnMeasureItemWidth(self, item):
        """"""

        item_name = self.GetItems()[item]
        return icons[item_name].GetWidth()
1198814
def console_get_width(con: tcod.console.Console) -> int:
    
    return int(lib.TCOD_console_get_width(_console(con)))
1306923
function getOuterWidth(el, defaultValue) {
    var width = this.getWidth(el, defaultValue);
    var bLeft = parseFloat(this.getStyle(el, 'borderLeftWidth')) || 0;
    var pLeft = parseFloat(this.getStyle(el, 'paddingLeft')) || 0;
    var pRight = parseFloat(this.getStyle(el, 'paddingRight')) || 0;
    var bRight = parseFloat(this.getStyle(el, 'borderRightWidth')) || 0;
    return width + bLeft + bRight + pLeft + pRight;
  }
1147835
public static int getScreenHeight(Context context) {
        DisplayMetrics metrics = context.getResources().getDisplayMetrics();
        return metrics.heightPixels;
    }
280761
public static boolean iconExists(@NonNull Context context, @NonNull String icon) {
        try {
            ITypeface font = findFont(context, icon.substring(0, 3));
            icon = icon.replace("-", "_");
            font.getIcon(icon);
            return true;
        } catch (Exception ignore) {
            return false;
        }
    }
930012
def font_width(self):
        """"""
        return self.get_font_width(font_name=self.font_name, font_size=self.font_size)
1013444
public int getRequiredWidth() {

        Element clone = CmsDomUtil.clone(getElement());
        clone.getStyle().setPosition(Position.ABSOLUTE);
        RootPanel.getBodyElement().appendChild(clone);
        int result = clone.getOffsetWidth();
        clone.removeFromParent();
        return result;
    }
847194
@NonNull
    public IconicsDrawable contourWidthRes(@DimenRes int sizeResId) {
        return contourWidthPx(mContext.getResources().getDimensionPixelSize(sizeResId));
    }
850028
public static int getDisplayHeight(@NonNull final Context context) {
        Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
        return context.getResources().getDisplayMetrics().heightPixels;
    }
209602
public float getStringWidth(String text, FontOptions options)
	{
		if (StringUtils.isEmpty(text))
			return 0;

		StringWalker walker = new StringWalker(text, options);
		walker.walkToEnd();
		return walker.width();
	}
897867
private int getContainerWidth() {

        int containerWidth = -1;
        try {
            containerWidth = Integer.parseInt(m_width);
        } catch (NumberFormatException e) {
            // do nothing, set width to -1
            LOG.debug("Error parsing container width.", e);
        }
        return containerWidth;
    }
805165
@Override
  public int width() {
    return calledNextStartPosition ? (noMorePositions ? 0
        : spans1.spans.endPosition() - spans1.spans.startPosition()) : 0;
  }
827153
public TextMetrics measure(final Context2D context)
    {
        final String text = getText();

        final double size = getFontSize();

        if ((null == text) || (text.isEmpty()) || (false == (size > 0)))
        {
            return TextMetrics.make(0, 0);
        }
        context.save();

        context.setTextAlign(TextAlign.LEFT);

        context.setTextBaseline(TextBaseLine.ALPHABETIC);

        context.setTextFont(TextUtils.getFontString(size, getTextUnit(), getFontStyle(), getFontFamily()));

        double width = getStrokeWidth();

        if (width == 0)
        {
            width = 1;
        }
        context.setStrokeWidth(width);

        context.transform(getAbsoluteTransform());

        final TextMetrics meas = context.measureText(text);

        final double height = context.measureText("M").getWidth();

        meas.setHeight(height - (height / 6));

        context.restore();

        return meas;
    }
1115449
public Integer getColWidth() {
        final Object result = getStateHelper().eval(PropertyKeys.colWidth, null);
        if (result == null) {
            return null;
        }
        return Integer.valueOf(result.toString());
    }
861869
@Override
  public int getSize(
      Paint paint,
      CharSequence text,
      int start,
      int end,
      Paint.FontMetricsInt fontMetrics) {
    updateBounds();
    if (fontMetrics == null) {
      return mWidth;
    }

    int offsetAbove = getOffsetAboveBaseline(fontMetrics);
    int offsetBelow = mHeight + offsetAbove;
    if (offsetAbove < fontMetrics.ascent) {
      fontMetrics.ascent = offsetAbove;
    }

    if (offsetAbove < fontMetrics.top) {
      fontMetrics.top = offsetAbove;
    }

    if (offsetBelow > fontMetrics.descent) {
      fontMetrics.descent = offsetBelow;
    }

    if (offsetBelow > fontMetrics.bottom) {
      fontMetrics.bottom = offsetBelow;
    }

    return mWidth;
  }
1216576
public static Bitmap retrieveThemeMapMarker(Context context) {
    TypedValue destinationMarkerResId = resolveAttributeFromId(context, R.attr.navigationViewDestinationMarker);
    int markerResId = destinationMarkerResId.resourceId;
    Drawable markerDrawable = ContextCompat.getDrawable(context, markerResId);
    return BitmapUtils.getBitmapFromDrawable(markerDrawable);
  }