freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][gsoc-2022-chariri-3] 9 commits: [ftinspec


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][gsoc-2022-chariri-3] 9 commits: [ftinspect] Fix background color in comparator view.
Date: Mon, 29 Aug 2022 15:22:40 +0000

Charlie Jiang pushed to branch gsoc-2022-chariri-3 at FreeType / FreeType Demo Programs

Commits:

  • 65328b90
    by Charlie Jiang at 2022-08-29T21:21:12+08:00
    [ftinspect] Fix background color in comparator view.
    
    * src/ftinspect/glyphcomponents/glyphcontinuous.cpp,
      src/ftinspect/glyphcomponents/glyphcontinuous.hpp:
      Save the background color when purging cache instead of always pulling
      from the engine (may already be overridden).
    
  • e8051110
    by Charlie Jiang at 2022-08-29T21:24:11+08:00
    [ftinspect] Fix color indicator.
    
    * src/ftinspect/panels/settingpanel.cpp: Swap blue and green component.
    
  • 4a5e0306
    by Charlie Jiang at 2022-08-29T21:27:47+08:00
    * src/ftinspect/engine/stringrenderer.cpp: Don't center text in waterfall...
    
    when the current source is set to "Text String (Repeated)".
    
  • 830c5478
    by Charlie Jiang at 2022-08-29T21:58:40+08:00
    [ftinspect] Enforce stricter check when opening files.
    
    * src/ftinspect/engine/fontfilemanager.cpp,
      src/ftinspect/engine/fontfilemanager.hpp:
      Open the font with `FT_New_Face` to verify the file and reject failed
      files.
      Pass file list by reference.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add ctor parameter for font file manager.
      Enforce check.
    
  • 02c6f37a
    by Charlie Jiang at 2022-08-29T22:01:17+08:00
    * src/ftinspect/panels/settingpanel.cpp: Set gamma range to [0.3, 3.0].
    
  • 9ac51b25
    by Charlie Jiang at 2022-08-29T22:06:01+08:00
    * src/ftinspect/panels/info.cpp: Emit messages when there's no composite...
    
    glyphs available.
    
  • 126a8f12
    by Charlie Jiang at 2022-08-29T22:17:05+08:00
    * src/ftinspect/panels/settingpanelmmgx.cpp: Fix MM/GX axis-widget mapping.
    
    There was a typo causing the widgets not properly cleaned when the axis
    count for current font decreases.
    
  • bb3d3fa9
    by Charlie Jiang at 2022-08-29T22:24:43+08:00
    [ftinspect] Gray out ineffective settings.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `currentFontHasEmbeddedBitmap` and `currentFontHasColorLayers`.
    
    * src/ftinspect/panels/settingpanel.cpp: Disable unavailable settings.
    
  • 7e949359
    by Charlie Jiang at 2022-08-29T23:21:50+08:00
    [ftinspect] Support non-Unicode charmaps for string renderer.
    
    * src/ftinspect/engine/stringrenderer.cpp,
      src/ftinspect/engine/stringrenderer.hpp:
      Use `QTextCodec` to convert encoding.
    

11 changed files:

Changes:

  • src/ftinspect/engine/engine.cpp
    ... ... @@ -123,6 +123,7 @@ faceRequester(FTC_FaceID ftcFaceID,
    123 123
     /////////////////////////////////////////////////////////////////////////////
    
    124 124
     
    
    125 125
     Engine::Engine()
    
    126
    +: fontFileManager_(this)
    
    126 127
     {
    
    127 128
       ftSize_ = NULL;
    
    128 129
       ftFallbackFace_ = NULL;
    
    ... ... @@ -546,6 +547,24 @@ Engine::currentFontBitmapOnly()
    546 547
     }
    
    547 548
     
    
    548 549
     
    
    550
    +bool
    
    551
    +Engine::currentFontHasEmbeddedBitmap()
    
    552
    +{
    
    553
    +  if (!ftFallbackFace_)
    
    554
    +    return false;
    
    555
    +  return FT_HAS_FIXED_SIZES(ftFallbackFace_);
    
    556
    +}
    
    557
    +
    
    558
    +
    
    559
    +bool
    
    560
    +Engine::currentFontHasColorLayers()
    
    561
    +{
    
    562
    +  if (!ftFallbackFace_)
    
    563
    +    return false;
    
    564
    +  return FT_HAS_COLOR(ftFallbackFace_);
    
    565
    +}
    
    566
    +
    
    567
    +
    
    549 568
     std::vector<int>
    
    550 569
     Engine::currentFontFixedSizes()
    
    551 570
     {
    
    ... ... @@ -679,9 +698,9 @@ Engine::numberOfOpenedFonts()
    679 698
     
    
    680 699
     
    
    681 700
     void
    
    682
    -Engine::openFonts(QStringList fontFileNames)
    
    701
    +Engine::openFonts(QStringList const& fontFileNames)
    
    683 702
     {
    
    684
    -  fontFileManager_.append(fontFileNames);
    
    703
    +  fontFileManager_.append(fontFileNames, true);
    
    685 704
     }
    
    686 705
     
    
    687 706
     
    

  • src/ftinspect/engine/engine.hpp
    ... ... @@ -97,7 +97,7 @@ public:
    97 97
       void reloadFont();
    
    98 98
       void loadPalette();
    
    99 99
     
    
    100
    -  void openFonts(QStringList fontFileNames);
    
    100
    +  void openFonts(QStringList const& fontFileNames);
    
    101 101
       void removeFont(int fontIndex, bool closeFile = true);
    
    102 102
       
    
    103 103
       void update();
    
    ... ... @@ -148,6 +148,8 @@ public:
    148 148
       std::vector<MMGXAxisInfo>& currentFontMMGXAxes() { return curMMGXAxes_; }
    
    149 149
       std::vector<SFNTTableInfo>& currentFontSFNTTableInfo();
    
    150 150
       bool currentFontBitmapOnly();
    
    151
    +  bool currentFontHasEmbeddedBitmap();
    
    152
    +  bool currentFontHasColorLayers();
    
    151 153
       std::vector<int> currentFontFixedSizes();
    
    152 154
       FontFileManager& fontFileManager() { return fontFileManager_; }
    
    153 155
       EngineDefaultValues& engineDefaults() { return engineDefaults_; }
    

  • src/ftinspect/engine/fontfilemanager.cpp
    ... ... @@ -8,8 +8,11 @@
    8 8
     #include <QCoreApplication>
    
    9 9
     #include <QMessageBox>
    
    10 10
     
    
    11
    +#include "engine.hpp"
    
    11 12
     
    
    12
    -FontFileManager::FontFileManager()
    
    13
    +
    
    14
    +FontFileManager::FontFileManager(Engine* engine)
    
    15
    +: engine_(engine)
    
    13 16
     {
    
    14 17
       fontWatcher_ = new QFileSystemWatcher(this);
    
    15 18
       // if the current input file is invalid we retry once a second to load it
    
    ... ... @@ -31,7 +34,7 @@ FontFileManager::size()
    31 34
     
    
    32 35
     
    
    33 36
     void
    
    34
    -FontFileManager::append(QStringList newFileNames, bool alertNotExist)
    
    37
    +FontFileManager::append(QStringList const& newFileNames, bool alertNotExist)
    
    35 38
     {
    
    36 39
       QStringList failedFiles;
    
    37 40
       for (auto& name : newFileNames)
    
    ... ... @@ -47,8 +50,13 @@ FontFileManager::append(QStringList newFileNames, bool alertNotExist)
    47 50
           continue;
    
    48 51
         }
    
    49 52
     
    
    50
    -    if (!info.exists() && alertNotExist)
    
    51
    -      failedFiles.append(name);
    
    53
    +    auto err = validateFontFile(name);
    
    54
    +    if (err)
    
    55
    +    {
    
    56
    +      if (alertNotExist)
    
    57
    +        failedFiles.append(QString("- %1: %2").arg(name).arg(err));
    
    58
    +      continue;
    
    59
    +    }
    
    52 60
     
    
    53 61
         // Uniquify elements
    
    54 62
         auto absPath = info.absoluteFilePath();
    
    ... ... @@ -144,6 +152,13 @@ FontFileManager::onWatcherFire()
    144 152
     }
    
    145 153
     
    
    146 154
     
    
    155
    +FT_Error
    
    156
    +FontFileManager::validateFontFile(QString const& fileName)
    
    157
    +{
    
    158
    +  return FT_New_Face(engine_->ftLibrary(), fileName.toUtf8(), -1, NULL);
    
    159
    +}
    
    160
    +
    
    161
    +
    
    147 162
     void
    
    148 163
     FontFileManager::onTimerFire()
    
    149 164
     {
    

  • src/ftinspect/engine/fontfilemanager.hpp
    ... ... @@ -10,20 +10,23 @@
    10 10
     #include <QTimer>
    
    11 11
     #include <QFileInfo>
    
    12 12
     
    
    13
    +#include <freetype/freetype.h>
    
    14
    +
    
    13 15
     
    
    14 16
     // Class to manage all opened font files, as well as monitoring local file
    
    15 17
     // change.
    
    16 18
     
    
    19
    +class Engine;
    
    17 20
     class FontFileManager
    
    18 21
     : public QObject
    
    19 22
     {
    
    20 23
       Q_OBJECT
    
    21 24
     public:
    
    22
    -  FontFileManager();
    
    25
    +  FontFileManager(Engine* engine);
    
    23 26
       ~FontFileManager() override = default;
    
    24 27
     
    
    25 28
       int size();
    
    26
    -  void append(QStringList newFileNames, bool alertNotExist = false);
    
    29
    +  void append(QStringList const& newFileNames, bool alertNotExist = false);
    
    27 30
       void remove(int index);
    
    28 31
     
    
    29 32
       QFileInfo& operator[](int index);
    
    ... ... @@ -41,11 +44,14 @@ private slots:
    41 44
       void onWatcherFire();
    
    42 45
     
    
    43 46
     private:
    
    47
    +  Engine* engine_;
    
    44 48
       QList<QFileInfo> fontFileNameList_;
    
    45 49
       QFileSystemWatcher* fontWatcher_;
    
    46 50
       QTimer* watchTimer_;
    
    47 51
     
    
    48 52
       bool periodicUpdating_ = false;
    
    53
    +
    
    54
    +  FT_Error validateFontFile(QString const& fileName);
    
    49 55
     };
    
    50 56
     
    
    51 57
     
    

  • src/ftinspect/engine/stringrenderer.cpp
    ... ... @@ -7,6 +7,8 @@
    7 7
     #include "engine.hpp"
    
    8 8
     
    
    9 9
     #include <cmath>
    
    10
    +#include <QTextCodec>
    
    11
    +
    
    10 12
     
    
    11 13
     StringRenderer::StringRenderer(Engine* engine)
    
    12 14
     : engine_(engine)
    
    ... ... @@ -105,7 +107,7 @@ StringRenderer::setUseString(QString const& string)
    105 107
       {
    
    106 108
         activeGlyphs_.emplace_back();
    
    107 109
         auto& it = activeGlyphs_.back();
    
    108
    -    it.charCode = static_cast<int>(ch);
    
    110
    +    it.charCodeUcs4 = it.charCode = static_cast<int>(ch);
    
    109 111
         it.glyphIndex = 0;
    
    110 112
         ++totalCount;
    
    111 113
         if (totalCount >= INT_MAX) // Prevent overflow
    
    ... ... @@ -131,15 +133,23 @@ StringRenderer::reloadGlyphIndices()
    131 133
         return;
    
    132 134
       int charMapIndex = charMapIndex_;
    
    133 135
       auto& charMaps = engine_->currentFontCharMaps();
    
    136
    +  if (charMaps.empty())
    
    137
    +    return;
    
    134 138
       if (charMapIndex < 0
    
    135
    -      || static_cast<unsigned>(charMapIndex) >= charMaps.size()
    
    136
    -      || charMaps[charMapIndex].encoding != FT_ENCODING_UNICODE)
    
    139
    +      || static_cast<unsigned>(charMapIndex) >= charMaps.size())
    
    137 140
         charMapIndex = engine_->currentFontFirstUnicodeCharMap();
    
    141
    +  if (charMapIndex < 0
    
    142
    +      || static_cast<unsigned>(charMapIndex) >= charMaps.size())
    
    143
    +    charMapIndex = 0;
    
    144
    +  auto encoding = charMaps[charMapIndex].encoding;
    
    138 145
     
    
    139 146
       if (charMapIndex < 0)
    
    140 147
         return;
    
    141 148
       for (auto& ctx : activeGlyphs_)
    
    142 149
       {
    
    150
    +    if (encoding != FT_ENCODING_UNICODE)
    
    151
    +      ctx.charCode = convertCharEncoding(ctx.charCodeUcs4, encoding);
    
    152
    +
    
    143 153
         auto index = engine_->glyphIndexFromCharCode(ctx.charCode, charMapIndex);
    
    144 154
         ctx.glyphIndex = static_cast<int>(index);
    
    145 155
       }
    
    ... ... @@ -407,8 +417,9 @@ StringRenderer::render(int width,
    407 417
         }
    
    408 418
     
    
    409 419
         int y = 0;
    
    410
    -    // no position param in "All Glyphs" mode
    
    411
    -    int x = static_cast<int>(usingString_ ? (width * position_) : 0);
    
    420
    +    // no position param in "All Glyphs" or repeated mode
    
    421
    +    int x = static_cast<int>((usingString_ && !repeated_) ? (width * position_)
    
    422
    +                                                          : 0);
    
    412 423
         int count = 0;
    
    413 424
     
    
    414 425
         while (true)
    
    ... ... @@ -649,4 +660,58 @@ StringRenderer::clearActive(bool glyphOnly)
    649 660
     }
    
    650 661
     
    
    651 662
     
    
    663
    +int
    
    664
    +StringRenderer::convertCharEncoding(int charUcs4, FT_Encoding encoding)
    
    665
    +{
    
    666
    +  switch (encoding)
    
    667
    +  {
    
    668
    +  case FT_ENCODING_MS_SYMBOL:
    
    669
    +  case FT_ENCODING_UNICODE:
    
    670
    +  case FT_ENCODING_ADOBE_STANDARD: // These may be problematic...
    
    671
    +  case FT_ENCODING_ADOBE_EXPERT:
    
    672
    +  case FT_ENCODING_ADOBE_CUSTOM:
    
    673
    +  case FT_ENCODING_ADOBE_LATIN_1:
    
    674
    +    return charUcs4;
    
    675
    +  }
    
    676
    +
    
    677
    +  auto mib = -1;
    
    678
    +  switch (encoding)
    
    679
    +  {
    
    680
    +  case FT_ENCODING_SJIS:
    
    681
    +    mib = 17; // Shift_JIS
    
    682
    +    break;
    
    683
    +  case FT_ENCODING_PRC:
    
    684
    +    mib = 114; // GB 18030
    
    685
    +    break;
    
    686
    +  case FT_ENCODING_BIG5:
    
    687
    +    mib = 2026; // Big5
    
    688
    +    break;
    
    689
    +  case FT_ENCODING_WANSUNG:
    
    690
    +    mib = -949; // KS C 5601:1987, this is a fake mib value
    
    691
    +    break;
    
    692
    +  case FT_ENCODING_JOHAB:
    
    693
    +    mib = 38; //  KS C 5601:1992 / EUC-KR
    
    694
    +    break;
    
    695
    +  case FT_ENCODING_APPLE_ROMAN:
    
    696
    +    mib = 2027;
    
    697
    +    break;
    
    698
    +  }
    
    699
    +
    
    700
    +  if (mib == -1)
    
    701
    +    return charUcs4; // unsupported charmap
    
    702
    +  auto codec = QTextCodec::codecForMib(mib);
    
    703
    +  if (!codec)
    
    704
    +    return charUcs4; // unsupported
    
    705
    +
    
    706
    +  auto res = codec->fromUnicode(
    
    707
    +      QString::fromUcs4(reinterpret_cast<uint*>(&charUcs4), 1));
    
    708
    +  if (res.size() == 0)
    
    709
    +    return charUcs4;
    
    710
    +  if (res.size() == 1)
    
    711
    +    return res[0];
    
    712
    +  return ((static_cast<int>(res[0]) & 0xFF) << 8)
    
    713
    +         | (static_cast<int>(res[1]) & 0xFF);
    
    714
    +}
    
    715
    +
    
    716
    +
    
    652 717
     // end of stringrenderer.cpp

  • src/ftinspect/engine/stringrenderer.hpp
    ... ... @@ -21,6 +21,7 @@ class Engine;
    21 21
     struct GlyphContext
    
    22 22
     {
    
    23 23
       int charCode = 0;
    
    24
    +  int charCodeUcs4 = 0;
    
    24 25
       int glyphIndex = 0;
    
    25 26
       FT_Glyph glyph = NULL;
    
    26 27
       FTC_Node cacheNode = NULL;
    
    ... ... @@ -217,4 +218,6 @@ private:
    217 218
                       FT_Vector& outActualLineWidth,
    
    218 219
                       bool handleMultiLine = false);
    
    219 220
       void clearActive(bool glyphOnly = false);
    
    221
    +
    
    222
    +  int convertCharEncoding(int charUcs4, FT_Encoding encoding);
    
    220 223
     };
    \ No newline at end of file

  • src/ftinspect/glyphcomponents/glyphcontinuous.cpp
    ... ... @@ -117,6 +117,7 @@ void
    117 117
     GlyphContinuous::purgeCache()
    
    118 118
     {
    
    119 119
       glyphCache_.clear();
    
    120
    +  backgroundColorCache_ = engine_->renderingEngine()->background();
    
    120 121
       currentWritingLine_ = NULL;
    
    121 122
     }
    
    122 123
     
    
    ... ... @@ -133,7 +134,7 @@ void
    133 134
     GlyphContinuous::paintEvent(QPaintEvent* event)
    
    134 135
     {
    
    135 136
       QPainter painter(this);
    
    136
    -  painter.fillRect(rect(), engine_->renderingEngine()->background());
    
    137
    +  painter.fillRect(rect(), backgroundColorCache_);
    
    137 138
     
    
    138 139
       if (glyphCache_.empty())
    
    139 140
         fillCache();
    

  • src/ftinspect/glyphcomponents/glyphcontinuous.hpp
    ... ... @@ -137,6 +137,7 @@ private:
    137 137
       FT_Stroker stroker_;
    
    138 138
     
    
    139 139
       std::vector<GlyphCacheLine> glyphCache_;
    
    140
    +  QColor backgroundColorCache_;
    
    140 141
       GlyphCacheLine* currentWritingLine_ = NULL;
    
    141 142
     
    
    142 143
       QPoint positionDelta_;
    

  • src/ftinspect/panels/info.cpp
    ... ... @@ -992,16 +992,34 @@ CompositeGlyphsTab::createConnections()
    992 992
     void
    
    993 993
     CompositeGlyphsTab::forceReloadFont()
    
    994 994
     {
    
    995
    +  engine_->reloadFont();
    
    996
    +  auto face = engine_->currentFallbackFtFace();
    
    997
    +  if (!face || !FT_IS_SFNT(face))
    
    998
    +  {
    
    999
    +    compositeGlyphCountPromptLabel_->setVisible(false);
    
    1000
    +    compositeGlyphCountLabel_->setText(tr("Not a SFNT font."));
    
    1001
    +  }
    
    1002
    +
    
    995 1003
       std::vector<CompositeGlyphInfo> list;
    
    996 1004
       CompositeGlyphInfo::get(engine_, list);
    
    997 1005
       if (list == compositeModel_->storage())
    
    998 1006
         return;
    
    999 1007
       compositeModel_->beginModelUpdate();
    
    1000
    -  compositeModel_->storage() = list;
    
    1008
    +  compositeModel_->storage() = std::move(list);
    
    1001 1009
       compositeModel_->endModelUpdate();
    
    1002 1010
     
    
    1003
    -  compositeGlyphCountLabel_->setText(
    
    1004
    -    QString::number(compositeModel_->storage().size()));
    
    1011
    +  if (compositeModel_->storage().empty())
    
    1012
    +  {
    
    1013
    +    compositeGlyphCountPromptLabel_->setVisible(false);
    
    1014
    +    compositeGlyphCountLabel_->setText(
    
    1015
    +      tr("No composite glyphs in the 'glyf' table."));
    
    1016
    +  }
    
    1017
    +  else
    
    1018
    +  {
    
    1019
    +    compositeGlyphCountPromptLabel_->setVisible(true);
    
    1020
    +    compositeGlyphCountLabel_->setText(
    
    1021
    +      QString::number(compositeModel_->storage().size()));
    
    1022
    +  }
    
    1005 1023
     }
    
    1006 1024
     
    
    1007 1025
     
    

  • src/ftinspect/panels/settingpanel.cpp
    ... ... @@ -134,14 +134,20 @@ SettingPanel::onFontChanged()
    134 134
         emit repaintNeeded();
    
    135 135
       }
    
    136 136
     
    
    137
    +  engine_->reloadFont();
    
    138
    +  auto hasColor = engine_->currentFontHasColorLayers();
    
    139
    +  colorLayerCheckBox_->setEnabled(hasColor);
    
    140
    +  if (!hasColor)
    
    141
    +    colorLayerCheckBox_->setChecked(false);
    
    137 142
       populatePalettes();
    
    138 143
       mmgxPanel_->reloadFont();
    
    139 144
       blockSignals(blockState);
    
    140 145
     
    
    141 146
       // Place this after `blockSignals` to let the signals emitted normally
    
    142
    -  engine_->reloadFont();
    
    143
    -  embeddedBitmapCheckBox_->setEnabled(!engine_->currentFontBitmapOnly());
    
    144
    -  if (engine_->currentFontBitmapOnly())
    
    147
    +  auto bmapOnly = engine_->currentFontBitmapOnly();
    
    148
    +  embeddedBitmapCheckBox_->setEnabled(
    
    149
    +    !bmapOnly && engine_->currentFontHasEmbeddedBitmap());
    
    150
    +  if (bmapOnly)
    
    145 151
         embeddedBitmapCheckBox_->setChecked(true);
    
    146 152
     }
    
    147 153
     
    
    ... ... @@ -236,14 +242,14 @@ SettingPanel::resetColorBlocks()
    236 242
       foregroundBlock_->setStyleSheet(
    
    237 243
         QString("QWidget {background-color: rgba(%1, %2, %3, %4);}")
    
    238 244
           .arg(foregroundColor_.red())
    
    239
    -      .arg(foregroundColor_.blue())
    
    240 245
           .arg(foregroundColor_.green())
    
    246
    +      .arg(foregroundColor_.blue())
    
    241 247
           .arg(foregroundColor_.alpha()));
    
    242 248
       backgroundBlock_->setStyleSheet(
    
    243 249
         QString("QWidget {background-color: rgba(%1, %2, %3, %4);}")
    
    244 250
           .arg(backgroundColor_.red())
    
    245
    -      .arg(backgroundColor_.blue())
    
    246 251
           .arg(backgroundColor_.green())
    
    252
    +      .arg(backgroundColor_.blue())
    
    247 253
           .arg(backgroundColor_.alpha()));
    
    248 254
     }
    
    249 255
     
    
    ... ... @@ -343,6 +349,7 @@ void
    343 349
     SettingPanel::checkAntiAliasing()
    
    344 350
     {
    
    345 351
       int index = antiAliasingComboBox_->currentIndex();
    
    352
    +  auto isMono = index == AntiAliasingComboBoxModel::AntiAliasing_None;
    
    346 353
       auto isLight
    
    347 354
         = index == AntiAliasingComboBoxModel::AntiAliasing_Light
    
    348 355
           || index == AntiAliasingComboBoxModel::AntiAliasing_Light_SubPixel;
    
    ... ... @@ -354,6 +361,7 @@ SettingPanel::checkAntiAliasing()
    354 361
       lcdFilterLabel_->setEnabled(!disableLCD);
    
    355 362
       lcdFilterComboBox_->setEnabled(!disableLCD);
    
    356 363
       stemDarkeningCheckBox_->setEnabled(isLight);
    
    364
    +  gammaSlider_->setEnabled(!isMono);
    
    357 365
     
    
    358 366
       emit repaintNeeded();
    
    359 367
     }
    
    ... ... @@ -556,7 +564,7 @@ SettingPanel::createLayout()
    556 564
       gammaLabel_ = new QLabel(tr("Gamma"), this);
    
    557 565
       gammaLabel_->setAlignment(Qt::AlignRight);
    
    558 566
       gammaSlider_ = new QSlider(Qt::Horizontal, this);
    
    559
    -  gammaSlider_->setRange(0, 30); // in 1/10th
    
    567
    +  gammaSlider_->setRange(3, 30); // in 1/10th
    
    560 568
       gammaSlider_->setTickPosition(QSlider::TicksBelow);
    
    561 569
       gammaSlider_->setTickInterval(5);
    
    562 570
       gammaSlider_->setPageStep(1);
    

  • src/ftinspect/panels/settingpanelmmgx.cpp
    ... ... @@ -38,7 +38,7 @@ SettingPanelMMGX::reloadFont()
    38 38
     
    
    39 39
       if (newSize < oldSize)
    
    40 40
       {
    
    41
    -    for (size_t i = oldSize; i < newSize; ++i)
    
    41
    +    for (size_t i = newSize; i < oldSize; ++i)
    
    42 42
         {
    
    43 43
           auto w = itemWidgets_[i];
    
    44 44
           disconnect(w);
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]