Custom Font Doesn't looks like Same on Qt
-
Hi,
I am using Custom Font: Exo2 SemiBold
When I try to use this font on my QT project, it doesn't look like same with originally (in Figma, WordPad)My Font:
WeTransfer Link
Figma:

My code:
QFontDatabase.applicationFontFamilies(QFontDatabase.addApplicationFont(":/source/img/f_Exo2_SemiBold.otf")) self.FONT_EXO_12 = QFont("Exo 2 Semi Bold", 12) self.FONT_EXO_12_2= QFont('Exo2', 12) # both doesn't look like same as on Figma -
Hi,
Did you check that you are getting the exact font you are requesting ?
-
- What is the value returned by
QFontDatabase.addApplicationFont()? (It returns -1 if it failed to load the font) - Print the list that is returned by
QFontDatabase.applicationFontFamilies()-- Is your custom font available in the list?
- What is the value returned by
-
- What is the value returned by
QFontDatabase.addApplicationFont()? (It returns -1 if it failed to load the font) - Print the list that is returned by
QFontDatabase.applicationFontFamilies()-- Is your custom font available in the list?
- What is the value returned by
-
addf = QFontDatabase.addApplicationFont(":/source/img/f_Exo2_SemiBold.otf") # returns 0 self.fontName= QFontDatabase.applicationFontFamilies(addf) print(self.fontName) # ['Exo 2 Semi Bold']Still looks like same.
@Emrecp said in Custom Font Doesn't looks like Same on Qt:
Still looks like same.
I had a closer look at your screenshots.
- Your Qt app's rendering of "Origin" looks very similar to Wordpad's rendering of "Origin"
- Your Qt app's rendering of "Oyunu Başlat" looks very similar to Figma's rendering of "Oyunu Başlat".
What is the problem?
self.FONT_EXO_12 = QFont("Exo 2 Semi Bold", 12)How does it look when you use font size
72instead of12? -
@Emrecp said in Custom Font Doesn't looks like Same on Qt:
Still looks like same.
I had a closer look at your screenshots.
- Your Qt app's rendering of "Origin" looks very similar to Wordpad's rendering of "Origin"
- Your Qt app's rendering of "Oyunu Başlat" looks very similar to Figma's rendering of "Oyunu Başlat".
What is the problem?
self.FONT_EXO_12 = QFont("Exo 2 Semi Bold", 12)How does it look when you use font size
72instead of12?