Subversion Repositories tpanel

Rev

Rev 323 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 323 Rev 334
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (C) 2020 to 2022 by Andreas Theofilu <andreas@theosys.at>
2
 * Copyright (C) 2020 to 2023 by Andreas Theofilu <andreas@theosys.at>
3
 *
3
 *
4
 * This program is free software; you can redistribute it and/or modify
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
6
 * the Free Software Foundation; either version 3 of the License, or
7
 * (at your option) any later version.
7
 * (at your option) any later version.
Line 519... Line 519...
519
    for (iter = mFonts.begin(); iter != mFonts.end(); ++iter)
519
    for (iter = mFonts.begin(); iter != mFonts.end(); ++iter)
520
    {
520
    {
521
        if (iter->second.file == file)
521
        if (iter->second.file == file)
522
            return iter->first;
522
            return iter->first;
523
    }
523
    }
-
 
524
#if TESTMODE == 1
-
 
525
    MSG_WARNING("There is no font file \"" << file << "\" found!");
-
 
526
#endif
-
 
527
    return -1;
-
 
528
}
-
 
529
 
-
 
530
int TFont::getFontIDfromName(const string &name)
-
 
531
{
-
 
532
    DECL_TRACER("TFont::getFontIDfromName(const string &name)");
-
 
533
 
-
 
534
    if (mFonts.size() == 0)
-
 
535
    {
-
 
536
        MSG_WARNING("No fonts found!");
-
 
537
        return -1;
-
 
538
    }
524
 
539
 
-
 
540
    map<int, FONT_T>::iterator iter;
-
 
541
 
-
 
542
    for (iter = mFonts.begin(); iter != mFonts.end(); ++iter)
-
 
543
    {
-
 
544
        if (iter->second.name == name)
-
 
545
            return iter->first;
-
 
546
    }
-
 
547
#if TESTMODE == 1
-
 
548
    MSG_WARNING("There is no font name \"" << name << "\" found!");
-
 
549
#endif
525
    return -1;
550
    return -1;
526
}
551
}
527
 
552
 
528
FONT_STYLE TFont::getStyle(int number)
553
FONT_STYLE TFont::getStyle(int number)
529
{
554
{