This question has been asked before, but I am having errors that I hope someone can help me with. I currently have a carousel on my site's home page and each slide in the carousel is an <img> of fixed height and a small <div> for text of a fixed height. The text that goes in the <div> can vary from a few words to a long sentence, and it will be changed to new text frequently.
I do not want to play with manually finding the best font fit size at all viewport widths for each piece of text that can go in there, so I found an article detailing all the different Javascript packages that can fit the text automatically. I tried both textFit and TextFill, and both of them a) do not preserve the font I was using and b) do not fit to the <div> 100% of the time. There are instances where the font will scale to try to fit, but a few letters will bleed over the right side of the <div> or the bottom part of the letters are cut off by the bottom of the <div>.
The font I am using is General Sans Semi Bold, and I don't understand why the font issues would be happening since it is defined for a variety of pixel sizes.
I'm looking for suggestions on how to use these packages correctly or alternate packages or methods that will achieve this scaling font effect at different viewport widths. Any help is appreciated, thank you!