DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2184
Version: 1.3-current


The 1.3 snapshot 6634 introduced Fl_Help_Font_Stack to FL/Fl_Help_Viewer.H,
but has a bug in pop() that sends the wrong font to fl_font() (one pop
behind).  The result is that most uses of <b>, <i>, or other font-changing
tags do not revert to the previous font when closed, or change to an
unexpected font in the stack.

I enclose a patch against 6725 to fix it.


Link: http://www.fltk.org/str.php?L2184
Version: 1.3-current
diff -Naur orig/fltk-1.3.x-r6725/FL/Fl_Help_View.H 
font-bug/fltk-1.3.x-r6725/FL/Fl_Help_View.H
--- orig/fltk-1.3.x-r6725/FL/Fl_Help_View.H     2009-03-15 17:28:50.000000000 
-0400
+++ font-bug/fltk-1.3.x-r6725/FL/Fl_Help_View.H 2009-03-28 19:24:15.000000000 
-0400
@@ -123,9 +123,9 @@
   }
   /** Pops from the stack the font style triplet and calls fl_font() & 
fl_color() adequately */
   void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { 
+    if (nfonts_ > 0) nfonts_ --;
     top(f, s, c);
     fl_font(f, s); fl_color(c);
-    if (nfonts_ > 0) nfonts_ --;
   }
   /** Gets the current count of font style elts in the stack */
   size_t count() const {return nfonts_;} /// Gets the current number of fonts 
in the stack
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to