R3F: Ade font style is not working on some glyphs
AxiomeCG opened this issue · comments
Hello,
I wanted to use the Ade font and for some reason it is not rendering properly using the drei component, that is wrapping troika-three-text I assume.
I wanted to know if there is anything to do about that ? Is it specific to the font itself ?
Here is the code I tried so far.
<>
<Text font={"/Ade.ttf"} fontSize={12} position={[-10,5,-5]} color={"#222222"}>
AAAAAA
</Text>
<Text font={"/Ade.ttf"} fontSize={12} position={[-10,5,-5]} fillOpacity={0} strokeColor={"#222222"} strokeWidth={0.175}>
AAAAAA
<meshBasicMaterial color={"#222222"} depthTest={false}/>
</Text>
</>
List of glyph of the font :
![image](https://private-user-images.githubusercontent.com/18304870/286361024-0dd3acb3-98c9-4ebf-954c-ea6a6892c49c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyODMyOTMsIm5iZiI6MTcxODI4Mjk5MywicGF0aCI6Ii8xODMwNDg3MC8yODYzNjEwMjQtMGRkM2FjYjMtOThjOS00ZWJmLTk1NGMtZWE2YTY4OTJjNDljLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjEzVDEyNDk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzMzRkYWI5ODUzMzZkYzUzOTdlNjc5M2VjZmRmNzU5MzFkZWM1NTUyYmI1NGI3MDJiNzFlODhkYmZlMjkwN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CTYneYmdbbaKZMr_GEXs6VNaLnDRB8sbcBBK7ry6m6Q)
Here is the font formats that I tried so far of the Ade font.
Ade-font.zip
You can also find it in : https://fontesk.com/ade-display-font/
That font has some very thin line features which can be difficult for SDF-based rendering. You might see some improvement if you set a higher sdfGlyphSize
.
Thank you for the tip, it makes it better but aliased with sdfGlyphSize=512
I happen to have increase the weight of the font in a font editor to see if it would be better, and it is nicer, but I would like if possible to be able to use the lib at its maximum potential for all kind of fonts so it is nice to know there is some adjustments that can be done !
Thank you for your guidance, I guess I can close the issue where it is mostly about the font, more than the lib itself !