# Change fonts using GLMakie

**URL:** https://discourse.julialang.org/t/change-fonts-using-glmakie/118619
**Category:** General Usage
**Tags:** question, plotting, makie
**Created:** [August 26, 2024, 12:19pm UTC](https://discourse.julialang.org/t/change-fonts-using-glmakie/118619 "2024-08-26T12:19:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NaSi](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@NaSi](https://discourse.julialang.org/u/NaSi)
#### Post date: [August 26, 2024, 12:19pm UTC](https://discourse.julialang.org/t/change-fonts-using-glmakie/118619/1 "2024-08-26T12:19:03Z")

</div>

Hello 🙂

I am trying to change the font style of my plot (I use GLMakie for plotting). I would like to change all (labels, titles …).  
I tried that but it doesn’t work 😕

```julia
# Figure : 
f = Figure(fontsize=26, font="Tahoma")
ax1 = GLMakie.Axis(f[1,1])
lines!(ax1, space_carbo,carbo_zone[:, 5000])
lines!(ax1, space_carbo,carbo_zone[:, 12000])

ax2 = GLMakie.Axis(f[2,1])
lines!(ax2, carbo_zone[501, :], color=RGBAf(0.0f0,0.61960787f0,0.4509804f0,1.0f0))
lines!(ax2, carbo_zone[843, :], color=RGBAf(0.8f0,0.4745098f0,0.654902f0,1.0f0))
f

```

Thanks,  
NaSi

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [August 26, 2024, 12:53pm UTC](https://discourse.julialang.org/t/change-fonts-using-glmakie/118619/2 "2024-08-26T12:53:02Z")

</div>

This works a bit differently, the defaults in Makie use `:regular` and `:bold` as their “fonts” and these are looked up in the `fonts` dictionary. So this works instead:

```julia
julia> f = Figure(fonts = (; regular = "Comic Sans", bold = "Comic Sans Bold"))
       Axis(f[1, 1], title = "Title")
       f

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/f/df521e50fa4d8e6d5acc1684bc22843275d72bd2.png)

---

<div class="post-metadata">

### Author: ![NaSi](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@NaSi](https://discourse.julialang.org/u/NaSi)
#### Post date: [August 27, 2024, 8:01am UTC](https://discourse.julialang.org/t/change-fonts-using-glmakie/118619/3 "2024-08-27T08:01:31Z")

</div>

> [@jules](#):
>
> `fonts = (; regular = "Comic Sans", bold = "Comic Sans Bold")`

Thanks ! it works great
