iari
04/01/2022, 11:34 AM"fontFace" {
fontFamily = FontFamily(Goldplay)
fontWeight = fw.unsafeCast<IntegerType>()
fontStyle = FontStyle.normal
src = "myfont-400.woff2"
}
turansky
04/01/2022, 12:21 PMturansky
04/01/2022, 12:24 PMunsafeCast
please
We have safe factories for all known propertiesturansky
04/01/2022, 12:24 PMfontWeight = integer(fw)
iari
04/01/2022, 12:36 PMfw
value that I get here is a numeric string at that point, thats why i used unsafecast...turansky
04/01/2022, 12:38 PMfontWeight = integer(fw.toInt())
turansky
04/01/2022, 1:04 PMiari
04/04/2022, 6:57 AMturansky
04/04/2022, 2:04 PMWilliam Persall
04/27/2024, 10:09 PMWilliam Persall
04/27/2024, 10:09 PMfontFace {
this.fontFamily = "Apple Chancery"
this.fontWeight = FontWeight.bold
this.fontStyle = FontStyle.normal
this.src = "url(./fonts/Apple_Chancery.tff)"
}
The font is located in my resource/fonts folder. When the page loads, I get a message in the console that the file cannot be loaded. The url is
localhost:8082/fonts/Apple_Chancery.tff
is the source url suppose to be to a website to down load the file or to the a local resource directory for the file? IF a local direcoty, What else needs to be done to retreive the file?
turansky
04/28/2024, 12:48 PMturansky
04/28/2024, 12:49 PMWilliam Persall
04/28/2024, 7:42 PMturansky
04/28/2024, 10:22 PMWilliam Persall
04/29/2024, 2:11 AM