Autosize font to fill cell on flashcard

Discuss the spreadsheet application

Autosize font to fill cell on flashcard

Postby gtaus » Sun Apr 26, 2020 10:19 am

To the point: Is there some way to tell Calc that I want the font size to be maximum 24 point on printout, but resize it down automatically until everything fits into the card boundaries for each individual cell?

Background: I am building a spreadsheet to print out flashcards. On sheet1, I have my database with, for example, the word in column 1 and the answer in column 2.

On sheet2, I have setup a template that imports the words on the sheet1 database and will print out the flashcards double sided, so the word is on one side and the flip side has the answer. I currently have the flashcard size set to 1.5X3.5 inches, which means on an 8.5X11 sheet of paper I can get 12 flashcards per page. I currently have the font size set to 24 point, which is large and easy to read.

However, my current database of flashcards includes sample sentences in the answer portion where the word is put into context in the original language. Moreover, this feature is automatically done by my website software so the word and sentence(s) are automatically exported to the database. Sometimes the sample sentences are up to 7 to 8 lines (at 10 point), so they overflow the card boundaries at 24 point.

Is there some way to tell Calc that I want the font size to be maximum 24 point on printout, but resize it down automatically until everything fits into the card boundaries for each individual cell? For example, if the answer + sentence is short, maybe 20 point would fit fine. However, an answer + long sentence(s) might have to be reduced to 10 point font size to fit. In other words, I am trying to keep the font size in the cell at 24 point but resize down automatically until everything fits.

I can do this manually, of course, on each individual cell. But that would take too much time and effort when I deal with word databases in the 100's or 1000's of words and examples. My online software automatically adjusts the font size on the screen so I can see the full answer. I am just trying to do the same type of thing on printouts of paper flashcards. Thanks in advance for any responses.
OpenOffice 4.1.1
Windows 7
gtaus
 
Posts: 28
Joined: Sat Feb 14, 2015 7:46 pm

Re: Autosize font to fill cell on flashcard

Postby Zizi64 » Sun Apr 26, 2020 11:04 am

gtaus wrote:To the point: Is there some way to tell Calc that I want the font size to be maximum 24 point on printout, but resize it down automatically until everything fits into the card boundaries for each individual cell?

Use the most valuable feature of the AOO/LO: the Styles.

Create and apply a custom cell style with 24 point font size and check in the option on the Alignment TAB: shrink to the cell size

Automatic_resize.png


Then just apply the Style to the desired cells.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9542
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Autosize font to fill cell on flashcard

Postby gtaus » Mon Apr 27, 2020 6:40 am

OK. I tried that but it does not work for me. If I select shrink to the cell size, it shrinks all 8 lines down to one tiny line that fits within the card boundary, but is unreadable. If I select Wrap Text Automatically (along with the Shrink Cell Size), it reverts back to the 24 point font and overflows the card - but it does wrap the text.

My data on Sheet2 is linked to the cells on Sheet1, and I thought maybe that reference tag is why the Style formatting did not work for me. But when I copy the actual data sentences and copy them into a new cell, and apply the Automatic_resize style, it's just the same thing. Either I get 1 line so small that it is unreadable, or I can wrap the text but it converts back to 24 point and overflows the cell.

I suspect the problem lies in that I have set a size for each cell in Sheet2 for printing of the flashcards. In a normal spreadsheet cell, the text would wrap and the cell itself would resize to fit the text. What I am asking OO Calc to do is to resize the text into the hard coded cell size of the printout.

There is one difference between your screen shot and my computer screen, I do not have the line "Text Direction" under my "Shrink to Fit Cell Size" checkbox. Are we using the same program/version? I have Apache OpenOffice 4.1.6 running on Windows 10.
OpenOffice 4.1.1
Windows 7
gtaus
 
Posts: 28
Joined: Sat Feb 14, 2015 7:46 pm

Re: Autosize font to fill cell on flashcard

Postby Zizi64 » Mon Apr 27, 2020 9:48 am

OK. I tried that but it does not work for me. If I select shrink to the cell size, it shrinks all 8 lines down to one tiny line that fits within the card boundary, but is unreadable. If I select Wrap Text Automatically (along with the Shrink Cell Size), it reverts back to the 24 point font and overflows the card - but it does wrap the text.

You can not mix these features in one cell.
And you can not format DIFFERENTLY the lines in a multiline cell by a Cell Style.

Use more than one cells for the differently formatted text contents.
Last edited by Zizi64 on Mon Apr 27, 2020 2:34 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9542
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Autosize font to fill cell on flashcard

Postby Lupp » Mon Apr 27, 2020 1:42 pm

@gtaus: Sorry. You will not (cannot) get a really useful answer as long as you don't give more details. To avoid the need of too many words you can upload a sample file showing some of your flashcards and enriched with explanations.
Zizi64 surely would agree.
Editing: Sorry for the typos. Now corrected.
Last edited by Lupp on Mon Apr 27, 2020 3:28 pm, edited 1 time in total.
On Windows 10: LibreOffice 7.0 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Lupp
Volunteer
 
Posts: 2913
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Autosize font to fill cell on flashcard

Postby Zizi64 » Mon Apr 27, 2020 2:35 pm

Ziz64 surely would agree.

Yes.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9542
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Calc

Who is online

Users browsing this forum: No registered users and 14 guests