code: public void updateInternals()
  	{
  		if (null == getContainer())
  		{
  			return;
  		}
  		super.updateInternals();
  
  		UnitConverter _uc = UnitConverter.getCachedInstance(getContainer().getSheetOfPaper().getPixelPerInch());
  		double _zoom = getContainer().convertMillimeterToUnit(_uc.convertPointToMillimiter(1));
  
  		myInternalFont = getFont().deriveFont(AffineTransform.getScaleInstance(_zoom, _zoom));
  
  		// update textformat
  		myTextFormat.clear();
  		myTextFormat.put(TextAttribute.FONT, myInternalFont);
  
  		myLineBreakMeasurer = new LineBreakMeasurer(new AttributedString(getText(), myTextFormat).getIterator(),
  				new FontRenderContext(null, true, true));
  
  		try
  		{
  			float _wrappingWidth = (float) getFullBounds().getWidth();
  			myTextLayout = myLineBreakMeasurer.nextLayout(_wrappingWidth);
  			myTextLayouts.clear();
  			myTextLayouts.add(myTextLayout);
  			while (myLineBreakMeasurer.getPosition() > 0 && myLineBreakMeasurer.getPosition() < getText().length())
  			{
  				myTextLayouts.add(myLineBreakMeasurer.nextLayout(_wrappingWidth));
  			}
  		}
  		catch (PaperContentIsUnattachedException _exception)
  		{
  			// Should not arrive
  			throw new RuntimeException("Impossible error");
  		}
  		myBaseLineOffset = myTextLayout.getAscent();
  		myTextHeight = myBaseLineOffset + myTextLayout.getDescent();
  		myLineHeight = myTextHeight + myTextLayout.getLeading();
  
  		// adjust the height
  		double _realHeight = myTextHeight; // at least one line
  		if (myTextLayouts.size() > 1)
  		{
  			_realHeight += ((myTextLayouts.size() - 1) * myLineHeight);
  		}
  		setCoreHeight(getContainer().convertUnitToMillimeter(_realHeight));
  		super.updateInternals();
  	}
docs: /*
  (non-Javadoc)
  
  @see com.sporniket.libre.ui.swing.paper.PaperContentAdapter#updateInternals()