[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D9070: KDE platform plugin: don't force default stylename on user-specified fonts
From:       René J.V. Bertin <noreply () phabricator ! kde ! org>
Date:       2017-11-30 21:28:39
Message-ID: 20171130212839.102596.0FE70C78329F6DA9 () phabricator ! kde ! org
[Download RAW message or body]

rjvbb added a comment.


  > On the other hand, calling setBold(true) on a font called "HandwriteCursive" \
_should_ select "HandwriteBoldCursive", even if the styleName was intended to enforce \
a specific face. If Qt cannot fix this issue, then we have to clear the styleName() \
at least for those fonts, where a perfect match is possible using the attributes \
alone (by comparing with the database again).  
  Indeed - and I think there are limits to what any automated system can do here. \
There's a point where you have to accept that fonts may have a design issue in how \
they're named and what additional information is available in the font file \
(fortunately the font name isn't the only metadata). And at that point you indeed \
have to fall back to using databases (maybe FontConfig could help here)?  
  > The patch also addresses the bug only for default fonts, but not per-application \
fonts that write their settings to the appnamerc file.  
  True. Yet I only got bold syntax highlighting again after I applied this patch in \
addition to removing the stylename extension from kateschemarc. I don't yet have an \
explanation for that ...  
  > All of those will also have a StyleName, so this here doesn't apply either.
  
  Hah, that depends with what Qt version they were generated, and on whether or not \
the user removed the parameter. I didn't invent that move myself, reading comments \
from others who did that to restore issues is what got me to write this patch in the \
end.  
  > Nothing gets overridden here. It's just that the user didn't specify it.
  
  Which probably means he didn't want it, in this case... What if that short name is \
one of the fonts from Christoph's example (and thus includes an explicit weight \
specification), are you going to do heuristics on it?  
  This kind of changing the default is fine for users who never use the configuration \
utilities and thus may not even have a kdeglobals file.  It can get a bit tricky if \
s/he has a spec in the file that corresponds to an old default, but when in doubt I \
always assume the user is right in this sort of thing.

REPOSITORY
  R135 Integration for Qt applications in Plasma

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

To: rjvbb, #frameworks, davidedmundson, graesslin, cfeck
Cc: cfeck, fvogt, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, \
jensreuterberg, abetts, sebas, apol, mart


[Attachment #3 (unknown)]

<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D9070" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid \
#a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; \
background-color: #f8f9fc;"><p>On the other hand, calling setBold(true) on a font \
called &quot;HandwriteCursive&quot; _should_ select &quot;HandwriteBoldCursive&quot;, \
even if the styleName was intended to enforce a specific face. If Qt cannot fix this \
issue, then we have to clear the styleName() at least for those fonts, where a \
perfect match is possible using the attributes alone (by comparing with the database \
again).</p></blockquote>

<p>Indeed - and I think there are limits to what any automated system can do here. \
There&#039;s a point where you have to accept that fonts may have a design issue in \
how they&#039;re named and what additional information is available in the font file \
(fortunately the font name isn&#039;t the only metadata). And at that point you \
indeed have to fall back to using databases (maybe FontConfig could help here)?</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: \
italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>The \
patch also addresses the bug only for default fonts, but not per-application fonts \
that write their settings to the appnamerc file.</p></blockquote>

<p>True. Yet I only got bold syntax highlighting again after I applied this patch in \
addition to removing the stylename extension from kateschemarc. I don&#039;t yet have \
an explanation for that ...</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: \
italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>All \
of those will also have a StyleName, so this here doesn&#039;t apply \
either.</p></blockquote>

<p>Hah, that depends with what Qt version they were generated, and on whether or not \
the user removed the parameter. I didn&#039;t invent that move myself, reading \
comments from others who did that to restore issues is what got me to write this \
patch in the end.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: \
italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: \
#f8f9fc;"><p>Nothing gets overridden here. It&#039;s just that the user didn&#039;t \
specify it.</p></blockquote>

<p>Which probably means he didn&#039;t want it, in this case... What if that short \
name is one of the fonts from Christoph&#039;s example (and thus includes an explicit \
weight specification), are you going to do heuristics on it?</p>

<p>This kind of changing the default is fine for users who never use the \
configuration utilities and thus may not even have a kdeglobals file.<br /> It can \
get a bit tricky if s/he has a spec in the file that corresponds to an old default, \
but when in doubt I always assume the user is right in this sort of \
thing.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R135 \
Integration for Qt applications in Plasma</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D9070" \
rel="noreferrer">https://phabricator.kde.org/D9070</a></div></div><br \
/><div><strong>To: </strong>rjvbb, Frameworks, davidedmundson, graesslin, cfeck<br \
/><strong>Cc: </strong>cfeck, fvogt, plasma-devel, ZrenBot, progwolff, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic