I am getting custom font via API as a String given below,
"@font-face {
font - family: 'Custom Font Name';
src: url('https://base_url/fonts/pGdyQlal_QW0WERKk_405638ad.eot');
src: url('https://base_url/fonts/pGdyQlal_QW0WERKk_405638ad.eot?#iefix') format('embedded-opentype'),
url('https://base_url/fonts/pGdyQlal_QW0WERKk_405638ad.ttf') format('opentype'),
url('https://base_url/fonts/pGdyQlal_QW0WERKk_405638ad.woff') format('woff');
font - weight: normal;
font - style: normal;
}
"
I need to put this font-family definition in style tag of a php/html file or write/append in an existing CSS file so that I can use the Custom Font Name as a value for font-family property. I have to populate select dropdown for selecting these custom fonts received in API. I am using Javascript, jQuery for Scripting.
Please guide for the way out, as what is getting received is a string and not getting recognised as css.