Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2724

[PATCH] Shrink text to fit block-container

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5
    • None
    • layout/block
    • None
    • Patch

    Description

      In my project I have to fill text in some fixed size area. This patch enable shrink text to fit block-container feature.
      When a block-container is not auto height, and with a fox:shrink-to-fit="true" attribute, If the block overflows It will reduce the font size and line height to fit the block-container.

      I'm not very familiar with the fop layout engine, this is a quick hack implementation, hope some one can improve it.

      I also committed the modified version in GitHub.
      https://github.com/chunlinyao/fop/tree/b1acf564afc9747546db6c386a0ae339e69f39e9

      Attachments

        1. shrink-to-fit.patch
          22 kB
          chunlinyao
        2. shrink-to-fit_20170802.patch
          22 kB
          chunlinyao
        3. block-container_shrink.pdf
          5 kB
          chunlinyao
        4. block-container_shrink.fo
          1 kB
          chunlinyao
        5. block-container_no_shrink.pdf
          5 kB
          chunlinyao
        6. block-container_no_shrink.fo
          1.0 kB
          chunlinyao

        Activity

          People

            Unassigned Unassigned
            chunlinyao chunlinyao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: