This question already has an answer here:

I would like to create a series of containers in the same size but with different contents, making such that the contained text reduces its font size if it would not fit the container otherwise.

Is there any way to automatically reduce font size to avoid overflowing of the container?

This question is a duplicate of Fit text into given box by adjusting the fontsize.

marked as duplicate by egreg, Jake, Peter Jansson, Stefan Kottwitz Dec 15 '13 at 22:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.