X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText2.cpp;h=7ff4a8a22fe9be0cc57f6c4c541fc0edc2c7a119;hb=837869452ad8d917615aa4bca77402dc49ba094e;hp=184de7b3a9e34057c47dfddec1736fd03b4b2382;hpb=9236a93894f6a182eb17a219b216eff747e50a27;p=lyx.git diff --git a/src/Text2.cpp b/src/Text2.cpp index 184de7b3a9..7ff4a8a22f 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -76,16 +76,7 @@ FontInfo Text::layoutFont(pit_type const pit) const // In case the default family has been customized if (layout.font.family() == INHERIT_FAMILY) lf.setFamily(owner_->buffer().params().getFont().fontInfo().family()); - // FIXME - // It ought to be possible here just to use Inset::getLayout() and skip - // the asInsetCollapsable() bit. Unfortunatley, that doesn't work right - // now, because Inset::getLayout() will return a default-constructed - // InsetLayout, and that e.g. sets the foreground color to red. So we - // need to do some work to make that possible. - InsetCollapsable const * icp = owner_->asInsetCollapsable(); - if (!icp) - return lf; - FontInfo icf = icp->getLayout().font(); + FontInfo icf = owner_->getLayout().font(); icf.realize(lf); return icf; }