[LyX/master] Initialize correct font in description label with ct

Juergen Spitzmueller spitz at lyx.org
Fri Dec 27 07:26:49 UTC 2019


commit c096382bebbbefb765d6f13f3d6daa2feb8f3ef7
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Fri Dec 27 08:42:43 2019 +0100

    Initialize correct font in description label with ct
    
    Fixes #10811
---
 src/Paragraph.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 3c4919c..e64480c 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2505,7 +2505,8 @@ void Paragraph::latex(BufferParams const & bparams,
 						basefont, needPar);
 					open_font = false;
 				}
-				basefont = getLayoutFont(bparams, outerfont);
+				basefont = (body_pos > i) ? getLabelFont(bparams, outerfont)
+							  : getLayoutFont(bparams, outerfont);
 				running_font = basefont;
 				column += Changes::latexMarkChange(os, bparams,
 					Change(Change::INSERTED), change, rp);
@@ -2525,7 +2526,8 @@ void Paragraph::latex(BufferParams const & bparams,
 						basefont, basefont, needPar);
 				open_font = false;
 			}
-			basefont = getLayoutFont(bparams, outerfont);
+			basefont = (body_pos > i) ? getLabelFont(bparams, outerfont)
+						  : getLayoutFont(bparams, outerfont);
 			running_font = basefont;
 			column += Changes::latexMarkChange(os, bparams, runningChange,
 							   change, runparams);


More information about the lyx-cvs mailing list