Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font “Dingbats” not available on system on project open #46206

Closed
2 tasks done
FelisPimeja opened this issue Nov 25, 2021 · 12 comments · Fixed by #46257
Closed
2 tasks done

Font “Dingbats” not available on system on project open #46206

FelisPimeja opened this issue Nov 25, 2021 · 12 comments · Fixed by #46257
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@FelisPimeja
Copy link
Contributor

FelisPimeja commented Nov 25, 2021

What is the bug or the crash?

When adding a Font marker style to point layer QGIS uses Dingbats font by default even if it's not available in the system. This leads to error Font “Dingbats” not available on system when you save and reopen the project. This may be a little confusing.

Steps to reproduce the issue

  1. Start New project
  2. Add Point layer
  3. Go to Styling panel and set Font Marker for layer styling, do not change anything else
  4. Save the project
  5. Reopen the Project
  6. Error "Font “Dingbats” not available on system" pops up

image

Dingbats.mov

If you open that particular project in text editor, you can find kind of this section:

      <renderer-v2 forceraster="0" type="singleSymbol" enableorderby="0" symbollevels="0" referencescale="-1">
        <symbols>
          <symbol clip_to_extent="1" type="marker" force_rhr="0" name="0" alpha="1">
            <data_defined_properties>
              <Option type="Map">
                <Option value="" type="QString" name="name"/>
                <Option name="properties"/>
                <Option value="collection" type="QString" name="type"/>
              </Option>
            </data_defined_properties>
            <layer enabled="1" pass="0" class="FontMarker" locked="0">
              <Option type="Map">
                <Option value="0" type="QString" name="angle"/>
                <Option value="A" type="QString" name="chr"/>
                <Option value="243,166,178,255" type="QString" name="color"/>
                <Option value="Dingbats" type="QString" name="font"/>
                <Option value="" type="QString" name="font_style"/>
                <Option value="1" type="QString" name="horizontal_anchor_point"/>
                <Option value="bevel" type="QString" name="joinstyle"/>
                <Option value="0,0" type="QString" name="offset"/>
                <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/>
                <Option value="MM" type="QString" name="offset_unit"/>
                <Option value="35,35,35,255" type="QString" name="outline_color"/>
                <Option value="0" type="QString" name="outline_width"/>
                <Option value="3x:0,0,0,0,0,0" type="QString" name="outline_width_map_unit_scale"/>
                <Option value="MM" type="QString" name="outline_width_unit"/>
                <Option value="2" type="QString" name="size"/>
                <Option value="3x:0,0,0,0,0,0" type="QString" name="size_map_unit_scale"/>
                <Option value="MM" type="QString" name="size_unit"/>
                <Option value="1" type="QString" name="vertical_anchor_point"/>
              </Option>
              <prop k="angle" v="0"/>
              <prop k="chr" v="A"/>
              <prop k="color" v="243,166,178,255"/>
              <prop k="font" v="Dingbats"/>
              <prop k="font_style" v=""/>
              <prop k="horizontal_anchor_point" v="1"/>
              <prop k="joinstyle" v="bevel"/>

Versions

MacOS 12.0.1 Monterey

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.22.0-Białowieża QGIS code revision d902269
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version 12.3
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 12.0
       
Active Python plugins
QuickOSM 1.16.0
osminfo 0.7.0
quick_map_services 0.19.11.1
BivariateRenderer 0.3
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.5

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@FelisPimeja FelisPimeja added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 25, 2021
@gioman gioman added the Symbology Related to vector layer symbology or renderers label Nov 25, 2021
@nyalldawson nyalldawson self-assigned this Nov 29, 2021
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Nov 29, 2021
symbol font from the available installed fonts

Fixes qgis#46206
nyalldawson added a commit that referenced this issue Nov 29, 2021
symbol font from the available installed fonts

Fixes #46206
@rbenet71
Copy link

rbenet71 commented Jan 7, 2022

I have the same problem, and my solution was: in Font Marker change Font MS Shell Dlg 2 to MS Serif.

@danceb
Copy link

danceb commented Jan 12, 2022

Is this really fixed? The issue does not relate only to the font "Dingbats". It relates to alle fonts which are used within a font marker symbology and are not installed on the system. We are running QGIS 3.22 and the warning still appears. With QGIS 3.18 there is no warning at the same project layers.

On Windows QGIS uses the logical font "MS Shell Dlg 2", which maps another available font to the missing one, as I am understanding this. Maybe there is an issue with that?

@nyalldawson
Copy link
Collaborator

. It relates to alle fonts which are used within a font marker symbology and are not installed on the system.

To me that's the correct behaviour -- why wouldn't you want to be warned if you are missing an important font used by your project?

@danceb
Copy link

danceb commented Jan 12, 2022

Ok, you're right. So this is an improvement which came with the latest releases and not a bug, I see.
The advantage was that you didn't notice when fonts from different operating systems were used and then they weren't available. If a symbology is created in Linux with a font that I don't have in Windows, the label was still displayed and I didn't get a warning.
But beyond that, I guess it makes sense to warn the user in principle if a font is not available. Thanks for the clarification.

@koenigherford
Copy link

@danceb:
As a workaround you may

  1. save the project in qgs-format
  2. open the qgs-file with a text-editior and search/replace all "dingbats"-occurences with "arial" (or other installed font) and
  3. save the file and close the text-editor.
  4. Then open ist with QGIS 3.22. and save the modified qgs-project ass qgz (overwrite the old qgz-project (formerly with "dingbats"fonts))

@rbenet71
Copy link

rbenet71 commented Jan 12, 2022 via email

@danceb
Copy link

danceb commented Jan 13, 2022

Changing a single QGIS project does not work for me. I am dealing with a PostGIS database with many layers and saved styles. So I am digging in the database for search and replace now. But thanks for your advices.

@dingausmwald
Copy link

My project isn't using this font, still i get this error. Everything works as before. This still happens in qgis 3.22.4

@danceb
Copy link

danceb commented Feb 22, 2022

. It relates to alle fonts which are used within a font marker symbology and are not installed on the system.

To me that's the correct behaviour -- why wouldn't you want to be warned if you are missing an important font used by your project?

As @nyalldawson mentioned before, this isn't an error, it should warn you.

Are you sure, that this font isn't used in a layerstyle? Just open the qgs-file in a text editor and search for the font name.

@dingausmwald
Copy link

Sorry, (annoying) warning. Yes, its written down there, but i still dont use it.

@danceb
Copy link

danceb commented Feb 22, 2022

If it is written in a layer style, your project try to use it, but can't because it isn't installed on your system. So the warning appears. Just replace 'Dingbats' with 'Arial' for instance in the text editor, open the project again and you would not get the warning anymore.

@kbjshop
Copy link

kbjshop commented May 4, 2022

Hi. I realize this is closed, but I noticed something that was not mentioned: The problem really is that when the default (in this case Dingbats) font is not on the system the Font Family dropdown selector shows the first available font. That would be ok IF it actually stored that font in the project. But it does not. It stored "Dingbats".

If the user simply makes another selection from this dropdown-- even reverting to the displayed first font, then it gets updated in the project.
So the real bug is the discrepancy between what is shown in the dropdown and what is stored in the project.

I see that it was fixed by using a suitable replacement default, which fixes it for new Font Markers, etc. It still leaves existing projects slightly confusing for those of us who created Font Markers without selecting a font, thinking we were using whatever was listed in that dropdown.

Not a big deal, but wanted to mention it for other users who may end up here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
8 participants