diff --git a/NEWS.md b/NEWS.md index bd9d758b482..a8b1e7254a0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ ## master +- Changed the default font from `Dejavu Sans` to `TeX Gyre Heros Makie` which is the same as `TeX Gyre Heros` with slightly decreased descenders and ascenders. Decreasing those metrics reduced unnecessary whitespace and alignment issues. Four fonts in total were added, the styles Regular, Bold, Italic and Bold Italic. Also changed `Axis`, `Axis3` and `Legend` attributes `titlefont` to `TeX Gyre Heros Makie Bold` in order to separate it better from axis labels in multifacet arrangements [#1897](https://github.com/JuliaPlots/Makie.jl/pull/1897). + ## v0.17.1 - Added word wrapping. In `Label`, `word_wrap = true` causes it to use the suggested width and wrap text to fit. In `text`, `word_wrap_width > 0` can be used to set a pixel unit line width. Any word (anything between two spaces without a newline) that goes beyond this width gets a newline inserted before it. [#1819](https://github.com/JuliaPlots/Makie.jl/pull/1819) - Improved `Axis3`'s interactive performance. [#1835](https://github.com/JuliaPlots/Makie.jl/pull/1835) diff --git a/assets/fonts/LICENSES.md b/assets/fonts/LICENSES.md index 4eae737b176..30cb732bb88 100644 --- a/assets/fonts/LICENSES.md +++ b/assets/fonts/LICENSES.md @@ -355,3 +355,35 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + + +# TeX Gyre Heros + +% This is version 1.0, dated 22 June 2009, of the GUST Font License. +% (GUST is the Polish TeX Users Group, http://www.gust.org.pl) +% +% For the most recent version of this license see +% http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt +% or +% http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt +% +% This work may be distributed and/or modified under the conditions +% of the LaTeX Project Public License, either version 1.3c of this +% license or (at your option) any later version. +% +% Please also observe the following clause: +% 1) it is requested, but not legally required, that derived works be +% distributed only after changing the names of the fonts comprising this +% work and given in an accompanying "manifest", and that the +% files comprising the Work, as listed in the manifest, also be given +% new names. Any exceptions to this request are also given in the +% manifest. +% +% We recommend the manifest be given in a separate file named +% MANIFEST-.txt, where is some unique identification +% of the font family. If a separate "readme" file accompanies the Work, +% we recommend a name of the form README-.txt. +% +% The latest version of the LaTeX Project Public License is in +% http://www.latex-project.org/lppl.txt and version 1.3c or later +% is part of all distributions of LaTeX version 2006/05/20 or later. diff --git a/assets/fonts/TeXGyreHerosMakie-Bold.otf b/assets/fonts/TeXGyreHerosMakie-Bold.otf new file mode 100644 index 00000000000..563cb050722 Binary files /dev/null and b/assets/fonts/TeXGyreHerosMakie-Bold.otf differ diff --git a/assets/fonts/TeXGyreHerosMakie-BoldItalic.otf b/assets/fonts/TeXGyreHerosMakie-BoldItalic.otf new file mode 100644 index 00000000000..ba321171f1d Binary files /dev/null and b/assets/fonts/TeXGyreHerosMakie-BoldItalic.otf differ diff --git a/assets/fonts/TeXGyreHerosMakie-Italic.otf b/assets/fonts/TeXGyreHerosMakie-Italic.otf new file mode 100644 index 00000000000..5f5b0d7f439 Binary files /dev/null and b/assets/fonts/TeXGyreHerosMakie-Italic.otf differ diff --git a/assets/fonts/TeXGyreHerosMakie-Regular.otf b/assets/fonts/TeXGyreHerosMakie-Regular.otf new file mode 100644 index 00000000000..7d816557e2f Binary files /dev/null and b/assets/fonts/TeXGyreHerosMakie-Regular.otf differ diff --git a/docs/documentation/inspector.md b/docs/documentation/inspector.md index 4dd028bd780..9472e54b30b 100644 --- a/docs/documentation/inspector.md +++ b/docs/documentation/inspector.md @@ -19,7 +19,7 @@ The `inspector = DataInspector(fig)` contains the following attributes: - `text_align = (:left, :bottom)`: Alignment of text within the tooltip. This does not affect the alignment of the tooltip relative to the cursor. - `textcolor = :black`: Tooltip text color. - `textsize = 20`: Tooltip text size. -- `font = "Dejavu Sans"`: Tooltip font. +- `font = "TeX Gyre Heros Makie"`: Tooltip font. - `background_color = :white`: Background color of the tooltip. - `outline_color = :grey`: Outline color of the tooltip. - `outline_linestyle = nothing`: Linestyle of the tooltip outline. diff --git a/docs/examples/plotting_functions/scatter.md b/docs/examples/plotting_functions/scatter.md index ccca3105f73..5a82c665cc7 100644 --- a/docs/examples/plotting_functions/scatter.md +++ b/docs/examples/plotting_functions/scatter.md @@ -76,13 +76,13 @@ scatter(points, color = 1:30, markersize = range(5, 30, length = 30), ### Available markers As markers, you can use almost any unicode character. -Currently, such glyphs are picked from the `Dejavu Sans` font, because it offers a wide range of symbols. +Currently, such glyphs are picked from the `TeX Gyre Heros Makie` font, because it offers a wide range of symbols. There is also a number of markers that can be referred to as a symbol, so that it's not necessary to find out the respective unicode character. The backslash character examples have to be tab-completed in the REPL or editor so they are converted into unicode. !!! note - The scatter markers have the same sizes that the glyphs in Dejavu Sans have. This means that they are not matched in size or area. Currently, Makie does not have the option to use area matched markers, and sometimes manual adjustment might be necessary to achieve a good visual result. + The scatter markers have the same sizes that the glyphs in TeX Gyre Heros Makie have. This means that they are not matched in size or area. Currently, Makie does not have the option to use area matched markers, and sometimes manual adjustment might be necessary to achieve a good visual result. \begin{examplefigure}{svg = true} ```julia diff --git a/docs/examples/plotting_functions/text.md b/docs/examples/plotting_functions/text.md index 2838b4ffbfe..2e09565f6b1 100644 --- a/docs/examples/plotting_functions/text.md +++ b/docs/examples/plotting_functions/text.md @@ -19,7 +19,7 @@ ### Other - `align::Tuple{Union{Symbol, Real}, Union{Symbol, Real}} = (:left, :bottom)` sets the alignment of the string w.r.t. `position`. Uses `:left, :center, :right, :top, :bottom, :baseline` or fractions. -- `font::Union{String, Vector{String}} = "Dejavu Sans"` sets the font for the string or each character. +- `font::Union{String, Vector{String}} = "TeX Gyre Heros Makie"` sets the font for the string or each character. - `justification::Union{Real, Symbol} = automatic` sets the alignment of text w.r.t its bounding box. Can be `:left, :center, :right` or a fraction. Will default to the horizontal alignment in `align`. - `position::Union{Point2f, Point3f} = Point2f(0)` sets an anchor position for text. Can also be a `Vector` of positions. - `rotation::Union{Real, Quaternion}` rotates text around the given position. diff --git a/docs/tutorials/layout-tutorial.md b/docs/tutorials/layout-tutorial.md index 02d33bc5eac..9434086ca1f 100644 --- a/docs/tutorials/layout-tutorial.md +++ b/docs/tutorials/layout-tutorial.md @@ -27,11 +27,8 @@ using CairoMakie using FileIO CairoMakie.activate!() # hide -noto_sans = assetpath("fonts", "NotoSans-Regular.ttf") -noto_sans_bold = assetpath("fonts", "NotoSans-Bold.ttf") - f = Figure(backgroundcolor = RGBf(0.98, 0.98, 0.98), - resolution = (1000, 700), font = noto_sans) + resolution = (1000, 700)) ``` \end{examplefigure} @@ -89,6 +86,16 @@ f ``` \end{examplefigure} +We can also choose different x ticks with whole numbers. + +\begin{examplefigure}{px_per_unit = 1.5} +```julia +axmain.xticks = 0:3:9 + +f +``` +\end{examplefigure} + ### Legend We have set the `label` attribute in the scatter call so it's easier to construct the legend. We can just pass `axmain` as the second argument to `Legend`. @@ -133,6 +140,7 @@ We can make a title by placing a label across the top two elements. \begin{examplefigure}{px_per_unit = 1.5} ```julia Label(ga[1, 1:2, Top()], "Stimulus ratings", valign = :bottom, + font = "TeX Gyre Heros Bold", padding = (0, 0, 5, 0)) f @@ -262,6 +270,7 @@ We can make a little title for the six axes by placing a `Label` in the top prot \begin{examplefigure}{px_per_unit = 1.5} ```julia Label(gd[1, :, Top()], "EEG traces", valign = :bottom, + font = "TeX Gyre Heros Bold", padding = (0, 0, 5, 0)) f @@ -333,7 +342,7 @@ That will leave all other alignments intact, because we're not creating any new for (label, layout) in zip(["A", "B", "C", "D"], [ga, gb, gc, gd]) Label(layout[1, 1, TopLeft()], label, textsize = 26, - font = noto_sans_bold, + font = "TeX Gyre Heros Bold", padding = (0, 5, 5, 0), halign = :right) end diff --git a/src/conversions.jl b/src/conversions.jl index 447cd068379..bf0d1a3a395 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -915,7 +915,7 @@ a string naming a font, e.g. helvetica function to_font(x::Union{Symbol, String}) str = string(x) get!(FONT_CACHE, str) do - str == "default" && return to_font("Dejavu Sans") + str == "default" && return to_font("TeX Gyre Heros Makie") # check if the string points to a font file and load that if isfile(str) @@ -930,12 +930,12 @@ function to_font(x::Union{Symbol, String}) fontpath = assetpath("fonts") font = FreeTypeAbstraction.findfont(str; additional_fonts=fontpath) if font === nothing - @warn("Could not find font $str, using Dejavu Sans") - if "dejavu sans" == lowercase(str) - # since we fall back to dejavu sans, we need to check for recursion - error("Recursion encountered; DejaVu Sans cannot be located in the font path $fontpath") + @warn("Could not find font $str, using TeX Gyre Heros Makie") + if "tex gyre heros makie" == lowercase(str) + # since we fall back to TeX Gyre Heros Makie, we need to check for recursion + error("Recursion encountered; TeX Gyre Heros Makie cannot be located in the font path $fontpath") end - return to_font("dejavu sans") + return to_font("TeX Gyre Heros Makie") end return font end diff --git a/src/interaction/inspector.jl b/src/interaction/inspector.jl index 58bbca155a9..d986c0dca64 100644 --- a/src/interaction/inspector.jl +++ b/src/interaction/inspector.jl @@ -414,7 +414,7 @@ Defaults to the current plot when called without arguments. does not affect the alignment of the tooltip relative to the cursor. - `textcolor = :black`: Tooltip text color. - `textsize = 20`: Tooltip text size. -- `font = "Dejavu Sans"`: Tooltip font. +- `font = "TeX Gyre Heros Makie"`: Tooltip font. - `background_color = :white`: Background color of the tooltip. - `outline_color = :grey`: Outline color of the tooltip. - `outline_linestyle = nothing`: Linestyle of the tooltip outline. diff --git a/src/makielayout/types.jl b/src/makielayout/types.jl index fd6bd495f7b..26a398570f9 100644 --- a/src/makielayout/types.jl +++ b/src/makielayout/types.jl @@ -198,7 +198,7 @@ end "The axis title string." title = "" "The font family of the title." - titlefont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "DejaVu Sans") + titlefont::Makie.FreeTypeAbstraction.FTFont = "TeX Gyre Heros Makie Bold" "The title's font size." titlesize::Float64 = @inherit(:fontsize, 16f0) "The gap between axis and title." @@ -210,9 +210,9 @@ end "The color of the title" titlecolor::RGBAf = @inherit(:textcolor, :black) "The font family of the xlabel." - xlabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "DejaVu Sans") + xlabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "TeX Gyre Heros Makie") "The font family of the ylabel." - ylabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "DejaVu Sans") + ylabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "TeX Gyre Heros Makie") "The color of the xlabel." xlabelcolor::RGBAf = @inherit(:textcolor, :black) "The color of the ylabel." @@ -230,9 +230,9 @@ end "The padding between the ylabel and the ticks or axis." ylabelpadding::Float64 = 5f0 # because of boundingbox inaccuracies of ticklabels "The font family of the xticklabels." - xticklabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "DejaVu Sans") + xticklabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "TeX Gyre Heros Makie") "The font family of the yticklabels." - yticklabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "DejaVu Sans") + yticklabelfont::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "TeX Gyre Heros Makie") "The color of xticklabels." xticklabelcolor::RGBAf = @inherit(:textcolor, :black) "The color of yticklabels." @@ -459,23 +459,23 @@ end "The color bar label string." label = "" "The label color." - labelcolor = inherit(scene, :textcolor, :black) + labelcolor = @inherit(:textcolor, :black) "The label font family." - labelfont = inherit(scene, :font, "DejaVu Sans") + labelfont = @inherit(:font, "TeX Gyre Heros Makie") "The label font size." - labelsize = inherit(scene, :fontsize, 16f0) + labelsize = @inherit(:fontsize, 16f0) "Controls if the label is visible." labelvisible = true "The gap between the label and the ticks." labelpadding = 5f0 "The font family of the tick labels." - ticklabelfont = inherit(scene, :font, "DejaVu Sans") + ticklabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The font size of the tick labels." - ticklabelsize = inherit(scene, :fontsize, 16f0) + ticklabelsize = @inherit(:fontsize, 16f0) "Controls if the tick labels are visible." ticklabelsvisible = true "The color of the tick labels." - ticklabelcolor = inherit(scene, :textcolor, :black) + ticklabelcolor = @inherit(:textcolor, :black) "The size of the tick marks." ticksize = 6f0 "Controls if the tick marks are visible." @@ -535,7 +535,7 @@ end "Controls if the parent layout can adjust to this element's height" tellheight = true "The colormap that the colorbar uses." - colormap = inherit(scene, :colormap, :viridis) + colormap = @inherit(:colormap, :viridis) "The range of values depicted in the colorbar." limits = nothing "The range of values depicted in the colorbar." @@ -574,11 +574,11 @@ end "Controls if the text is visible." visible::Bool = true "The color of the text." - color::RGBAf = inherit(scene, :textcolor, :black) + color::RGBAf = @inherit(:textcolor, :black) "The font size of the text." - textsize::Float32 = inherit(scene, :fontsize, 16f0) + textsize::Float32 = @inherit(:fontsize, 16f0) "The font family of the text." - font::Makie.FreeTypeAbstraction.FTFont = inherit(scene, :font, "DejaVu Sans") + font::Makie.FreeTypeAbstraction.FTFont = @inherit(:font, "TeX Gyre Heros Makie") "The justification of the text (:left, :right, :center)." justification = :center "The lineheight multiplier for the text." @@ -748,11 +748,11 @@ end "The extra space added to the sides of the button label's boundingbox." padding = (10f0, 10f0, 10f0, 10f0) "The font size of the button label." - textsize = inherit(scene, :fontsize, 16f0) + textsize = @inherit(:fontsize, 16f0) "The text of the button label." label = "Button" "The font family of the button label." - font = inherit(scene, :font, "DejaVu Sans") + font = @inherit(:font, "TeX Gyre Heros Makie") "The width setting of the button." width = Auto() "The height setting of the button." @@ -772,7 +772,7 @@ end "The color of the button." buttoncolor = RGBf(0.94, 0.94, 0.94) "The color of the label." - labelcolor = inherit(scene, :textcolor, :black) + labelcolor = @inherit(:textcolor, :black) "The color of the label when the mouse hovers over the button." labelcolor_hover = :black "The color of the label when the mouse clicks the button." @@ -863,7 +863,7 @@ end "The list of options selectable in the menu. This can be any iterable of a mixture of strings and containers with one string and one other value. If an entry is just a string, that string is both label and selection. If an entry is a container with one string and one other value, the string is the label and the other value is the selection." options = ["no options"] "Font size of the cell texts" - textsize = inherit(scene, :fontsize, 16f0) + textsize = @inherit(:fontsize, 16f0) "Padding of entry texts" textpadding = (10, 10, 10, 10) "Color of entry texts" @@ -916,9 +916,9 @@ const EntryGroup = Tuple{Optional{<:AbstractString}, Vector{LegendEntry}} "Controls if the parent layout can adjust to this element's height" tellheight = automatic "The font family of the legend group titles." - titlefont = inherit(scene, :font, "DejaVu Sans") + titlefont = "TeX Gyre Heros Makie Bold" "The font size of the legend group titles." - titlesize = inherit(scene, :fontsize, 16f0) + titlesize = @inherit(:fontsize, 16f0) "The horizontal alignment of the legend group titles." titlehalign = :center "The vertical alignment of the legend group titles." @@ -926,15 +926,15 @@ const EntryGroup = Tuple{Optional{<:AbstractString}, Vector{LegendEntry}} "Controls if the legend titles are visible." titlevisible = true "The color of the legend titles" - titlecolor = inherit(scene, :textcolor, :black) + titlecolor = @inherit(:textcolor, :black) "The group title positions relative to their groups. Can be `:top` or `:left`." titleposition = :top "The font size of the entry labels." - labelsize = inherit(scene, :fontsize, 16f0) + labelsize = @inherit(:fontsize, 16f0) "The font family of the entry labels." - labelfont = inherit(scene, :font, "DejaVu Sans") + labelfont = @inherit(:font, "TeX Gyre Heros Makie") "The color of the entry labels." - labelcolor = inherit(scene, :textcolor, :black) + labelcolor = @inherit(:textcolor, :black) "The horizontal alignment of the entry labels." labelhalign = :left "The justification of the label text. Default is `automatic`, which will set the justification to labelhalign." @@ -1065,13 +1065,13 @@ end "Controls if the textbox is defocused when a string is submitted." defocus_on_submit = true "Text size." - textsize = inherit(scene, :fontsize, 16f0) + textsize = @inherit(:fontsize, 16f0) "Text color." - textcolor = inherit(scene, :textcolor, :black) + textcolor = @inherit(:textcolor, :black) "Text color for the placeholder." textcolor_placeholder = RGBf(0.5, 0.5, 0.5) "Font family." - font = inherit(scene, :font, "DejaVu Sans") + font = @inherit(:font, "TeX Gyre Heros Makie") "Color of the box." boxcolor = :transparent "Color of the box when focused." @@ -1150,11 +1150,11 @@ end "The z label" zlabel = "z" "The x label color" - xlabelcolor = inherit(scene, :textcolor, :black) + xlabelcolor = @inherit(:textcolor, :black) "The y label color" - ylabelcolor = inherit(scene, :textcolor, :black) + ylabelcolor = @inherit(:textcolor, :black) "The z label color" - zlabelcolor = inherit(scene, :textcolor, :black) + zlabelcolor = @inherit(:textcolor, :black) "Controls if the x label is visible" xlabelvisible = true "Controls if the y label is visible" @@ -1174,17 +1174,17 @@ end "Controls if the z ticks are visible" zticksvisible = true "The x label size" - xlabelsize = inherit(scene, :fontsize, 16f0) + xlabelsize = @inherit(:fontsize, 16f0) "The y label size" - ylabelsize = inherit(scene, :fontsize, 16f0) + ylabelsize = @inherit(:fontsize, 16f0) "The z label size" - zlabelsize = inherit(scene, :fontsize, 16f0) + zlabelsize = @inherit(:fontsize, 16f0) "The x label font" - xlabelfont = inherit(scene, :font, "DejaVu Sans") + xlabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The y label font" - ylabelfont = inherit(scene, :font, "DejaVu Sans") + ylabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The z label font" - zlabelfont = inherit(scene, :font, "DejaVu Sans") + zlabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The x label rotation" xlabelrotation = Makie.automatic "The y label rotation" @@ -1204,17 +1204,17 @@ end "The z label offset" zlabeloffset = 50 "The x ticklabel color" - xticklabelcolor = inherit(scene, :textcolor, :black) + xticklabelcolor = @inherit(:textcolor, :black) "The y ticklabel color" - yticklabelcolor = inherit(scene, :textcolor, :black) + yticklabelcolor = @inherit(:textcolor, :black) "The z ticklabel color" - zticklabelcolor = inherit(scene, :textcolor, :black) + zticklabelcolor = @inherit(:textcolor, :black) "The x ticklabel size" - xticklabelsize = inherit(scene, :fontsize, 16f0) + xticklabelsize = @inherit(:fontsize, 16f0) "The y ticklabel size" - yticklabelsize = inherit(scene, :fontsize, 16f0) + yticklabelsize = @inherit(:fontsize, 16f0) "The z ticklabel size" - zticklabelsize = inherit(scene, :fontsize, 16f0) + zticklabelsize = @inherit(:fontsize, 16f0) "The x ticklabel pad" xticklabelpad = 5 "The y ticklabel pad" @@ -1222,11 +1222,11 @@ end "The z ticklabel pad" zticklabelpad = 10 "The x ticklabel font" - xticklabelfont = inherit(scene, :font, "DejaVu Sans") + xticklabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The y ticklabel font" - yticklabelfont = inherit(scene, :font, "DejaVu Sans") + yticklabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The z ticklabel font" - zticklabelfont = inherit(scene, :font, "DejaVu Sans") + zticklabelfont = @inherit(:font, "TeX Gyre Heros Makie") "The x grid color" xgridcolor = RGBAf(0, 0, 0, 0.12) "The y grid color" @@ -1304,9 +1304,9 @@ end "The axis title string." title = "" "The font family of the title." - titlefont = inherit(scene, :font, "DejaVu Sans") + titlefont = "TeX Gyre Heros Makie Bold" "The title's font size." - titlesize = inherit(scene, :fontsize, 16f0) + titlesize = @inherit(:fontsize, 16f0) "The gap between axis and title." titlegap = 4f0 "Controls if the title is visible." @@ -1314,7 +1314,7 @@ end "The horizontal alignment of the title." titlealign = :center "The color of the title" - titlecolor = inherit(scene, :textcolor, :black) + titlecolor = @inherit(:textcolor, :black) "The color of the xy panel" xypanelcolor = :transparent "The color of the yz panel" diff --git a/src/theming.jl b/src/theming.jl index 6ea7308982e..0793d24a3ac 100644 --- a/src/theming.jl +++ b/src/theming.jl @@ -55,7 +55,7 @@ const default_palettes = Attributes( const minimal_default = Attributes( palette = default_palettes, - font = "Dejavu Sans", + font = "TeX Gyre Heros Makie", textcolor = :black, padding = Vec3f(0.05), figure_padding = 16, diff --git a/src/utilities/texture_atlas.jl b/src/utilities/texture_atlas.jl index ad067f3bd19..ee2e68118e9 100644 --- a/src/utilities/texture_atlas.jl +++ b/src/utilities/texture_atlas.jl @@ -64,7 +64,7 @@ begin function defaultfont() if isempty(_default_font) - push!(_default_font, to_font("Dejavu Sans")) + push!(_default_font, to_font("TeX Gyre Heros Makie")) end _default_font[] end @@ -72,6 +72,7 @@ begin function alternativefonts() if isempty(_alternative_fonts) alternatives = [ + "TeXGyreHerosMakie-Regular.otf", "DejaVuSans.ttf", "NotoSansCJKkr-Regular.otf", "NotoSansCuneiform-Regular.ttf", diff --git a/test/text.jl b/test/text.jl index 6f1afbb4cf0..132b36186a6 100644 --- a/test/text.jl +++ b/test/text.jl @@ -43,7 +43,7 @@ @test glyph_collection isa Makie.GlyphCollection @test glyph_collection.glyphs == chars @test glyph_collection.fonts == [font for _ in 1:4] - @test glyph_collection.origins == [Point3f(x, 0, 0) for x in origins] + @test all(isapprox.(glyph_collection.origins, [Point3f(x, 0, 0) for x in origins], atol = 1e-10)) @test glyph_collection.extents == unit_extents @test glyph_collection.scales.sv == [Vec2f(p.textsize[]) for _ in 1:4] @test glyph_collection.rotations.sv == [Quaternionf(0,0,0,1) for _ in 1:4]