Cesium, custom font in label

502 views
Skip to first unread message

André Borud

unread,
Aug 29, 2016, 9:14:32 AM8/29/16
to cesium-dev
Is there a way to use a custom font in a label? Tried adding it to css files in the cesium library but it never works and reverts to a stock serif font. How can I make this work?

Scott Hunter

unread,
Aug 29, 2016, 10:22:22 AM8/29/16
to cesiu...@googlegroups.com
You can use web fonts in labels as you normally would in CSS.  There is no need to modify the CSS files in Cesium.  Instead, just add the font-face declarations to your own CSS in your application, so that the font is loaded, and then you can use the web font in the value you specify for "font", using normal CSS syntax.

On Mon, Aug 29, 2016 at 9:14 AM, André Borud <andre...@gmail.com> wrote:
Is there a way to use a custom font in a label? Tried adding it to css files in the cesium library but it never works and reverts to a stock serif font. How can I make this work?

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Qandeel Abbassi

unread,
Mar 1, 2017, 4:54:17 AM3/1/17
to cesium-dev
Hello Scott,
I tried your solution but it didn't work. Can you please please give an example with code?


On Monday, August 29, 2016 at 7:22:22 PM UTC+5, Scott Hunter wrote:
You can use web fonts in labels as you normally would in CSS.  There is no need to modify the CSS files in Cesium.  Instead, just add the font-face declarations to your own CSS in your application, so that the font is loaded, and then you can use the web font in the value you specify for "font", using normal CSS syntax.
On Mon, Aug 29, 2016 at 9:14 AM, André Borud <andre...@gmail.com> wrote:
Is there a way to use a custom font in a label? Tried adding it to css files in the cesium library but it never works and reverts to a stock serif font. How can I make this work?

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.

Hannah Pinkos

unread,
Mar 1, 2017, 8:22:02 AM3/1/17
to cesium-dev
Reply all
Reply to author
Forward
0 new messages