<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>123325</bug_id>
          
          <creation_ts>2006-03-09 11:59:48 +0000</creation_ts>
          <short_desc>Font changing with DCOP or Schema</short_desc>
          <delta_ts>2006-06-09 18:25:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsole</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Thomas Eriksson">thomas.eriksson</reporter>
          <assigned_to name="Konsole Bugs">konsole-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>420524</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Eriksson">thomas.eriksson</who>
    <bug_when>2006-03-09 11:59:49 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages
OS:                Linux

I&apos;m the author of the Bashish console theme engine, http://bashish.sf.net

I intend to port Bashish to konsole. What I have got working so far (prototyping) is fg/bg and 16-color changing by generating schemas on the fly.

I have not been able to implement font changing since I found no way of changing fonts except interactively, so my wish is for the Konsole devs to add the following attribute under the session-[n] &quot;class&quot; in dcop:

void setFont(QFont font)

and if possible the following to ease scriptability, so one doesn&apos;t have to
write a C++ helper :)
void setFontName(String fontname)
void setFontSize(int size)

a third option would be to add the font as a variable in the Schema.

(I&apos;m using an old version of console, but from looking at the changelog, no such feature have appeared)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>436842</commentid>
    <comment_count>1</comment_count>
      <attachid>15939</attachid>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2006-05-06 18:44:27 +0000</bug_when>
    <thetext>Created attachment 15939
Patch to add DCOP calls for settings font

Too late to make it into KDE 3.5.3.

% dcop konsole-19829 session-1 font
DejaVu Sans Mono,14,-1,5,50,0,0,0,0,0
% dcop konsole-19829 session-1 setFont Cheq,8,-1,5,50,0,0,0,0,0
% dcop konsole-19829 session-1 font 
Cheq,8,-1,5,50,0,0,0,0,0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>436845</commentid>
    <comment_count>2</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2006-05-06 18:52:05 +0000</bug_when>
    <thetext>SVN commit 538057 by hindenburg:

Add DCOP calls for font.  Can not test on /trunk right now.

CCBUG: 123325


 M  +14 -0     session.cpp  
 M  +2 -0      session.h  
 M  +2 -0      sessioniface.h  


--- trunk/KDE/kdebase/apps/konsole/konsole/session.cpp #538056:538057
@@ -750,6 +750,20 @@
   emit setSessionSchema(this, schema);
 }
 
+QString TESession::font()
+{
+  return te-&gt;getVTFont().toString();
+}
+
+void TESession::setFont(const QString &amp;font)
+{
+  QFont tmp;
+  if (tmp.fromString(font))
+    te-&gt;setVTFont(tmp);
+  else
+    kdWarning()&lt;&lt;&quot;unknown font: &quot;&lt;&lt;font&lt;&lt;endl;
+}
+
 QString TESession::encoding()
 {
   return em-&gt;codec()-&gt;name();
--- trunk/KDE/kdebase/apps/konsole/konsole/session.h #538056:538057
@@ -114,6 +114,8 @@
   void setKeytab(const QString &amp;keytab);
   QSize size();
   void setSize(QSize size);
+  void setFont(const QString &amp;font);
+  QString font();
 
 public Q_SLOTS:
 
--- trunk/KDE/kdebase/apps/konsole/konsole/sessioniface.h #538056:538057
@@ -25,6 +25,8 @@
     virtual void setKeytab(const QString &amp;keyboard) =0;
     virtual QSize size() =0;
     virtual void setSize(QSize size) =0;
+    virtual QString font() =0;
+    virtual void setFont(const QString &amp;font) =0;
 };
 
 #endif // SESSIONIFACE_H
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>445368</commentid>
    <comment_count>3</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2006-06-09 18:25:47 +0000</bug_when>
    <thetext>SVN commit 549730 by hindenburg:

Add DCOP calls setFont() and font().

BUG: 123325


 M  +14 -0     session.cpp  
 M  +2 -0      session.h  
 M  +2 -0      sessioniface.h  


--- branches/KDE/3.5/kdebase/konsole/konsole/session.cpp #549729:549730
@@ -764,6 +764,20 @@
   emit setSessionSchema(this, schema);
 }
 
+QString TESession::font()
+{
+  return te-&gt;getVTFont().toString();
+}
+
+void TESession::setFont(const QString &amp;font)
+{
+  QFont tmp;
+  if (tmp.fromString(font))
+    te-&gt;setVTFont(tmp);
+  else
+    kdWarning()&lt;&lt;&quot;unknown font: &quot;&lt;&lt;font&lt;&lt;endl;
+}
+
 QString TESession::encoding()
 {
   return em-&gt;codec()-&gt;name();
--- branches/KDE/3.5/kdebase/konsole/konsole/session.h #549729:549730
@@ -113,6 +113,8 @@
   void setKeytab(const QString &amp;keytab);
   QSize size();
   void setSize(QSize size);
+  void setFont(const QString &amp;font);
+  QString font();
 
 public slots:
 
--- branches/KDE/3.5/kdebase/konsole/konsole/sessioniface.h #549729:549730
@@ -24,6 +24,8 @@
     virtual void setKeytab(const QString &amp;keyboard) =0;
     virtual QSize size() =0;
     virtual void setSize(QSize size) =0;
+    virtual QString font() =0;
+    virtual void setFont(const QString &amp;font) =0;
 };
 
 #endif // SESSIONIFACE_H
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>15939</attachid>
            <date>2006-05-06 18:44:27 +0000</date>
            <delta_ts>2006-05-06 18:44:27 +0000</delta_ts>
            <desc>Patch to add DCOP calls for settings font</desc>
            <filename>BR123325.diff</filename>
            <type>text/plain</type>
            <size>1287</size>
            <attacher name="Kurt Hindenburg">khindenburg</attacher>
            
              <data encoding="base64">SW5kZXg6IHNlc3Npb24uY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHNlc3Npb24uY3BwCShyZXZpc2lvbiA1
MzYzNTgpCisrKyBzZXNzaW9uLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNzY0LDYgKzc2NCwyMCBA
QAogICBlbWl0IHNldFNlc3Npb25TY2hlbWEodGhpcywgc2NoZW1hKTsKIH0KIAorUVN0cmluZyBU
RVNlc3Npb246OmZvbnQoKQoreworICByZXR1cm4gdGUtPmdldFZURm9udCgpLnRvU3RyaW5nKCk7
Cit9CisKK3ZvaWQgVEVTZXNzaW9uOjpzZXRGb250KGNvbnN0IFFTdHJpbmcgJmZvbnQpCit7Cisg
IFFGb250IHRtcDsKKyAgaWYgKHRtcC5mcm9tU3RyaW5nKGZvbnQpKQorICAgIHRlLT5zZXRWVEZv
bnQodG1wKTsKKyAgZWxzZQorICAgIGtkV2FybmluZygpPDwidW5rbm93biBmb250OiAiPDxmb250
PDxlbmRsOworfQorCiBRU3RyaW5nIFRFU2Vzc2lvbjo6ZW5jb2RpbmcoKQogewogICByZXR1cm4g
ZW0tPmNvZGVjKCktPm5hbWUoKTsKSW5kZXg6IHNlc3Npb24uaAo9PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzZXNz
aW9uLmgJKHJldmlzaW9uIDUzNjM1OCkKKysrIHNlc3Npb24uaAkod29ya2luZyBjb3B5KQpAQCAt
MTEzLDYgKzExMyw4IEBACiAgIHZvaWQgc2V0S2V5dGFiKGNvbnN0IFFTdHJpbmcgJmtleXRhYik7
CiAgIFFTaXplIHNpemUoKTsKICAgdm9pZCBzZXRTaXplKFFTaXplIHNpemUpOworICB2b2lkIHNl
dEZvbnQoY29uc3QgUVN0cmluZyAmZm9udCk7CisgIFFTdHJpbmcgZm9udCgpOwogCiBwdWJsaWMg
c2xvdHM6CiAKSW5kZXg6IHNlc3Npb25pZmFjZS5oCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHNlc3Npb25pZmFj
ZS5oCShyZXZpc2lvbiA1MzYzNTgpCisrKyBzZXNzaW9uaWZhY2UuaAkod29ya2luZyBjb3B5KQpA
QCAtMjQsNiArMjQsOCBAQAogICAgIHZpcnR1YWwgdm9pZCBzZXRLZXl0YWIoY29uc3QgUVN0cmlu
ZyAma2V5Ym9hcmQpID0wOwogICAgIHZpcnR1YWwgUVNpemUgc2l6ZSgpID0wOwogICAgIHZpcnR1
YWwgdm9pZCBzZXRTaXplKFFTaXplIHNpemUpID0wOworICAgIHZpcnR1YWwgUVN0cmluZyBmb250
KCkgPTA7CisgICAgdmlydHVhbCB2b2lkIHNldEZvbnQoY29uc3QgUVN0cmluZyAmZm9udCkgPTA7
CiB9OwogCiAjZW5kaWYgLy8gU0VTU0lPTklGQUNFX0gK
</data>

          </attachment>
      

    </bug>

</bugzilla>