There are a few ways to adjust font size to fit within a div.
The first way is to simply use the "vw" or "vh" CSS unit, which stands for viewport width and viewport height respectively. This unit of measure will essentially size the font to the width or height of the viewport, thereby making it scale to its div size.
The second way is by using the "em" or "rem" unit. This unit works the same way as the previous unit, but will size the font relative to its parent element. The "em" unit sizes relative to its font-size, whilst the "rem" will size the font relative to the root element.
The third way is by using the "calc" function. This allows you to set a font size that is calculated using math operators. For example, if you wanted your font size to be 20% of the width of its parent element, you would use the calc function as such: font-size: calc(100% - 20%).
Finally, the fourth way is to use media queries. This allows you to set certain font sizes depending on the size of the viewport. You can target different device widths this way.
In conclusion, there are several ways to adapt font size to div size. Depending on the particular project, one of these techniques can be used to achieve the desired result.