Skip to content

Commit

Permalink
Fixed #148 (Wrong font is used)
Browse files Browse the repository at this point in the history
  • Loading branch information
klayoutmatthias committed Jul 27, 2018
1 parent e2f4c18 commit 082a91c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Changelog
@@ -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
Expand All @@ -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.
Expand Down
16 changes: 9 additions & 7 deletions src/lay/lay/layFontController.cc
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 082a91c

Please sign in to comment.