From 79ba584c69f5b19afe280ebbb47860d0992816e6 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Thu, 17 Oct 2019 12:11:06 -0400 Subject: [PATCH] Document in the text method place --- docs/conf.py | 4 ++-- docs/text_feature.rst | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9d45672..8d4602b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ author = u'Andy Meneely' # built documents. # # The short X.Y version. -version = u'v0.15' +version = u'v0.16' # The full version, including alpha/beta/rc tags. -release = u'v0.15.0' +release = u'v0.16.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/text_feature.rst b/docs/text_feature.rst index b69d754..583fa2b 100644 --- a/docs/text_feature.rst +++ b/docs/text_feature.rst @@ -35,6 +35,10 @@ Width and Height By default, Pango text boxes will scale the text box to whatever you need, hence the ``:native`` default. However, for most of the other customizations to work (e.g. center-aligned) you'll need to specify the width. If both the width and the height are specified and the text overflows, then the ``ellipsize`` option is consulted to figure out what to do with the overflow. Also, the ``valign`` will only work if ``height`` is also set to something other than ``:native``. +Autoscaling Font Size +--------------------- +See our sample below `Sample: _autoscale_font.rb`_ + Hints ----- @@ -113,3 +117,10 @@ Sample: config_text_markup.rb .. literalinclude:: ../samples/config/config_disable_quotes.yml :language: ruby :linenos: + +Sample: _autoscale_font.rb +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/autoscale_font/_autoscale_font.rb + :language: ruby + :linenos: