UPDATE to my answer. I now prefer a different answer on this page, which is to use Nano: https://graphicdesign.stackexchange.com/a/121950/45239
Assuming you've downloaded and installed a web font on your system and have created an SVG (maybe using a lot of the same steps as I describe below but not choosing "Font: Convert To Outlines"), you can upload the SVG to Nano and see the "Embed font: Yes" option, and click Download.
My previous answer:
If you're willing to sacrifice having selectable text and SEO:
- Download the web font.
- Install it locally.
- Open Adobe Illustrator
- Type your text.
- File > Export > Export As…
- Choose ".SVG"
- Choose these settings:
- Styling: Inline Style
- Font: Convert To Outlines
- Images: Preserve
- Object IDs: Layer Names
- Decimal: 2
- (enabled) Minify
- (enabled) Responsive
- Optionally upload the resulting svg to https://vecta.io/nano (It was able to reduce my file size by 8.2%)