:param text: Text of the widget
        :param size: Size of the text (Higher size = smaller title)
772561
def build(self, text, size=1):
        
        super(Title, self).build()
        self.content = text
        self.size = size
885372
def setText( self, text ):
        
        if text is None:
            text = ''
        
        super(XLineEdit, self).setText(projex.text.encoded(self.formatText(text), self.encoding()))
825794
def set_value(self, text):
        
        if self.single_line:
            text = text.replace('\n', '')
        self.set_text(text)
202882
def maybe_set_size(self, min_itemsize=None):
        
        if _ensure_decoded(self.kind) == 'string':

            if isinstance(min_itemsize, dict):
                min_itemsize = min_itemsize.get(self.name)

            if min_itemsize is not None and self.typ.itemsize < min_itemsize:
                self.typ = _tables(
                ).StringCol(itemsize=min_itemsize, pos=self.pos)
865424
public void setSize(final double size) {
        this.size = size;
        stack.setPrefSize(size, size);
        text.setFont(Font.font(text.getFont().getFamily(), FontWeight.BOLD, size / 2));
        svgIcon.setSize(size);
        stack.requestLayout();
    }
840654
def set_size(self, size):
        
        if size == 'small':
            self._set_size_small()
        elif size == 'large':
            self._set_size_large()
        else:
            raise ValueError('Size must be large or small')
504987
public void setTextSize(final TextSize SIZE) {
        if (null == textSize) {
            _textSize = SIZE;
            fireTileEvent(REDRAW_EVENT);
        } else {
            textSize.set(SIZE);
        }
    }
1079508
def Update(self, size):
    '''
    
    '''
    if self._msg is None:
      return
    help_msg = self._msg
    width, height = size
    content_area = int((width / 3) * .70)

    wiggle_room = range(int(content_area - content_area * .05), int(content_area + content_area * .05))
    if help_msg.Size[0] not in wiggle_room:
      self._msg.SetLabel(self._msg.GetLabelText().replace('\n', ' '))
      self._msg.Wrap(content_area)
562069
def text(self, text):
        
        tc = self._tc
        tc.clear_content()
        p = tc.add_p()
        r = p.add_r()
        r.text = text
585179
public void setText(String text) {

        m_label.setText(text);
        m_label.setTitle(text);
        m_text = text;
        if (m_textMetricsKey != null) {
            truncate(m_textMetricsKey, m_labelWidth);
        }
    }
1336786
private void resizeStaticText() {
        double maxWidth = size * 0.455;
        double fontSize = size * 0.08082707;
        titleText.setFont(Fonts.latoBold(fontSize));
        if (titleText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(titleText, maxWidth, fontSize); }
        titleText.relocate((size - titleText.getLayoutBounds().getWidth()) * 0.5, size * 0.22180451);
    }
975225
@Override protected void resizeDynamicText() {
        double maxWidth = unitText.isVisible() ? width - size * 0.275 : width - size * 0.1;
        double fontSize = size * 0.24;
        valueText.setFont(Fonts.latoRegular(fontSize));
        if (valueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(valueText, maxWidth, fontSize); }
    }
947577
public void setTextSize(int unit, float size) {
        if (!mSizeToFit) {
            mTextView.setTextSize(unit, size);
        }

        Context context = mTextView.getContext();
        Resources r = Resources.getSystem();

        if (context != null) {
            r = context.getResources();
        }

        setRawTextSize(TypedValue.applyDimension(unit, size, r.getDisplayMetrics()));
    }
269032
public void setCustomTickLabelFontSize(final double SIZE) {
        if (null == customTickLabelFontSize) {
            _customTickLabelFontSize = Helper.clamp(0.0, 72.0, SIZE);
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            customTickLabelFontSize.set(SIZE);
        }
    }
192553
def wizard_font(text):
    
    text_length = len(text)
    if text_length <= TEXT_XLARGE_THRESHOLD:
        font = random.choice(XLARGE_WIZARD_FONT)
    elif text_length > TEXT_XLARGE_THRESHOLD and text_length <= TEXT_LARGE_THRESHOLD:
        font = random.choice(LARGE_WIZARD_FONT)
    elif text_length > TEXT_LARGE_THRESHOLD and text_length <= TEXT_MEDIUM_THRESHOLD:
        font = random.choice(MEDIUM_WIZARD_FONT)
    else:
        font = random.choice(SMALL_WIZARD_FONT)
    return font
886232
def add_text(self, text):
        
        t = self._r.add_t(text)
        return _Text(t)
915416
def text_width(text):
    """"""
    (xmin, xmax, d1, d2) = get_dimension(text)
    return xmax - xmin