tobiasdeiminger added a comment.

  In D20760#456328 <https://phabricator.kde.org/D20760#456328>, @davidhurka 
wrote:
  
  > Isn’t there a coding convention against non-ascii symbols in source code?
  
  
  There are Qt source code conventions 
<https://wiki.qt.io/Coding_Conventions#Conventions_in_Qt_source_code>. Don't 
know if Okular policy exists for which conventions to follow, but I agree it 
makes sense to avoid non-ascii (don't rely on source code input encoding). 
QString::fromUtf8 <https://doc.qt.io/qt-5/qstring.html#fromUtf8> combined with 
a u8 string literal <https://en.cppreference.com/w/cpp/language/string_literal> 
should work, but haven't tested. Other ideas?
  
  > And I think real icons (like svg) would be better. What if someone changes 
the system font? At least I see some boring rectangles in the source code.
  
  If we want to avoid the unicode approach completely, I'd advocate to 
implement drawing the lines by code, i.e. QPainter::drawLine 
<https://doc.qt.io/qt-5/qpainter.html#drawLine> and friends. Then reuse the 
same code to draw icons. So we gain non-PDF support while we are at it, and I 
guess it's not much more work than crafting the SVG.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D20760

To: knambiar, #okular, #vdg
Cc: davidhurka, tobiasdeiminger, ngraham, okular-devel, joaonetto, tfella, 
darcyshen, aacid

Reply via email to