Answer the question
In order to leave comments, you need to log in
Is it possible to get font name from ttf file using javascript?
For example, the font Exo2-Regular is connected on the page
@font-face {
font-family: 'Exo2-Regular';
src: url('fonts/Exo2-Regular/Exo2-Regular.eot');
src: url('fonts/Exo2-Regular/Exo2-Regular.eot') format('embedded-opentype'),
url('fonts/Exo2-Regular/Exo2-Regular.woff') format('woff'),
url('fonts/Exo2-Regular/Exo2-Regular.woff2') format('woff2'),
url('fonts/Exo2-Regular/Exo2-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
var fontFamily = $(this).css('font-family');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question