mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
STR 2701: more tolerant Xft Font Attribute interpretation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1373,6 +1373,10 @@ void Fl_Text_Display::previous_word() {
|
|||||||
Callback attached to the text buffer to receive delete information before
|
Callback attached to the text buffer to receive delete information before
|
||||||
the modifications are actually made.
|
the modifications are actually made.
|
||||||
|
|
||||||
|
This callback can be used to adjust
|
||||||
|
the display or update other setting. It is not advisable to change any
|
||||||
|
buffers or text in this callback, or line counting may get out of sync.
|
||||||
|
|
||||||
\param pos starting index of deletion
|
\param pos starting index of deletion
|
||||||
\param nDeleted number of bytes we will delete (must be UTF-8 aligned!)
|
\param nDeleted number of bytes we will delete (must be UTF-8 aligned!)
|
||||||
\param cbArg "this" pointer for static callback function
|
\param cbArg "this" pointer for static callback function
|
||||||
@@ -1402,6 +1406,10 @@ void Fl_Text_Display::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) {
|
|||||||
|
|
||||||
Callback attached to the text buffer to receive modification information
|
Callback attached to the text buffer to receive modification information
|
||||||
|
|
||||||
|
This callback can be used to adjust
|
||||||
|
the display or update other setting. It is not advisable to change any
|
||||||
|
buffers or text in this callback, or line counting may get out of sync.
|
||||||
|
|
||||||
\param pos starting index of modification
|
\param pos starting index of modification
|
||||||
\param nInserted number of bytes we inserted (must be UTF-8 aligned!)
|
\param nInserted number of bytes we inserted (must be UTF-8 aligned!)
|
||||||
\param nDeleted number of bytes deleted (must be UTF-8 aligned!)
|
\param nDeleted number of bytes deleted (must be UTF-8 aligned!)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ static void make_raw_name(char *raw, char *pretty)
|
|||||||
while ((style) && (style < last))
|
while ((style) && (style < last))
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
while ((*style == '=') || (*style == ' ') || (*style == '\t'))
|
while ((*style == '=') || (*style == ' ') || (*style == '\t') || (*style == ','))
|
||||||
{
|
{
|
||||||
style++; // Start of Style string
|
style++; // Start of Style string
|
||||||
if ((style >= last) || (*style == 0)) continue;
|
if ((style >= last) || (*style == 0)) continue;
|
||||||
@@ -165,7 +165,7 @@ static void make_raw_name(char *raw, char *pretty)
|
|||||||
goto NEXT_STYLE;
|
goto NEXT_STYLE;
|
||||||
} // switch end
|
} // switch end
|
||||||
NEXT_STYLE:
|
NEXT_STYLE:
|
||||||
while ((*style != ' ') && (*style != '\t'))
|
while ((*style != ' ') && (*style != '\t') && (*style != ','))
|
||||||
{
|
{
|
||||||
style++;
|
style++;
|
||||||
if ((style >= last) || (*style == 0)) goto STYLE_DONE;
|
if ((style >= last) || (*style == 0)) goto STYLE_DONE;
|
||||||
@@ -276,10 +276,12 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
|
|||||||
first = (char *)font; // name is just what was returned
|
first = (char *)font; // name is just what was returned
|
||||||
}
|
}
|
||||||
// Truncate the name after the (english) modifiers description
|
// Truncate the name after the (english) modifiers description
|
||||||
if (stop)
|
// Matt: Actually, there is no guarantee that the *first* description is the English one.
|
||||||
{
|
// Matt: So we keep the entire description, just in case.
|
||||||
*stop = 0; // Terminate the string at the first comma, if there is one
|
//if (stop)
|
||||||
}
|
//{
|
||||||
|
// *stop = 0; // Terminate the string at the first comma, if there is one
|
||||||
|
//}
|
||||||
|
|
||||||
// Copy the font description into our list
|
// Copy the font description into our list
|
||||||
if (first == (char *)font)
|
if (first == (char *)font)
|
||||||
|
|||||||
Reference in New Issue
Block a user