Closed croudet closed 5 years ago
Since it is a web-component and to simplify things, we bundle every thing in one file, putting fonts inside the bundle and using it from there will increase its size, block rendering longer, reduces flexibility to change fonts.
Having said that, RapiDoc uses some web-safe fonts, so even if you dont have the fonts, it will fall back on the font that most likely your OS would have.
However, in case you would like to get fonts from a CDN or would like to use a Font that matches your brand/style-guide then you can define your own font face or use some cdn service like shown below
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
and then
use the attributes regular-font
and mono-font
<rapi-doc
spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json"
heading-text="My Rounded Font !!!"
regular-font="'Varela Round', 'Arial Rounded MT Bold', 'Helvetica Rounded' "
> </rapi-doc>
there is an example on this, check it out in action here and the code for it is here
This is more a question than an issue. I am loading rapidoc from
unpkg
:And I saw that fonts are loaded from where index.html is served:
Is it possible to have the fonts taken from
unpkg
?Thanks