Fixed #148 (Wrong font is used)

This commit is contained in:
Matthias Koefferlein 2018-07-28 00:17:02 +02:00
parent e2f4c1874a
commit 082a91cf15
2 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
0.25.4 (2018-07-11):
0.25.4 (2018-07-28):
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/121
Issue with multiple reads of GDS2 layouts including PCells
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/134
@ -11,6 +11,8 @@
Issue with RBA::QHostAddress (ambiguous overload) on Qt5
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/142
Issue with RBA::RecursiveShapeIterator#region=
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/148
Wrong font is used
* Bugfix: 8 bit indexed GIF images can be used for package icons now
* Enhancement: Provide a way to specify the type of a macro
This feature is mainly useful for command line arguments.

View File

@ -112,13 +112,11 @@ FontController::can_exit (lay::PluginRoot * /*root*/) const
void
FontController::sync_dirs ()
{
if (! m_file_watcher) {
return;
if (m_file_watcher) {
m_file_watcher->clear ();
m_file_watcher->enable (false);
}
m_file_watcher->clear ();
m_file_watcher->enable (false);
std::vector<std::string> paths = lay::ApplicationBase::instance ()->klayout_path ();
// add the salt grains as potential sources for library definitions
@ -137,14 +135,18 @@ FontController::sync_dirs ()
for (std::vector <std::string>::const_iterator p = paths.begin (); p != paths.end (); ++p) {
QDir fp = QDir (tl::to_qstring (*p)).filePath (tl::to_qstring ("fonts"));
if (fp.exists ()) {
m_file_watcher->add_file (tl::to_string (fp.absolutePath ()));
if (m_file_watcher) {
m_file_watcher->add_file (tl::to_string (fp.absolutePath ()));
}
font_paths.push_back (tl::to_string (fp.absolutePath ()));
}
}
db::TextGenerator::set_font_paths (font_paths);
m_file_watcher->enable (true);
if (m_file_watcher) {
m_file_watcher->enable (true);
}
}
void