<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://julien.danjou.info/blog/index.php/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>jd:/dev/blog - gmarkup</title>
  <link>http://julien.danjou.info/blog/index.php/</link>
  <description>Julien Danjou's blog</description>
  <language>fr</language>
  <pubDate>Fri, 03 Oct 2008 21:09:26 +0200</pubDate>
  <copyright>All Right Reserved</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Extending pango markup attributes</title>
    <link>http://julien.danjou.info/blog/index.php/post/2008/04/27/Extending-pango-markup-attributes</link>
    <guid isPermaLink="false">urn:md5:4406d2233dc144fa82df8b412af562f0</guid>
    <pubDate>Sun, 27 Apr 2008 10:00:00 +0200</pubDate>
    <dc:creator>jd</dc:creator>
        <category>awesome</category>
        <category>awesome</category><category>glib</category><category>gmarkup</category><category>pango</category>    
    <description>    &lt;p&gt;I'm currently facing a  problem I just can't solve, involving pango and GMarkup's glib API.&lt;/p&gt;


&lt;p&gt;I currently use &lt;a href=&quot;http://library.gnome.org/devel/pango/unstable/PangoMarkupFormat.html&quot;&gt;pango markup&lt;/a&gt; in &lt;a href=&quot;http://awesome.naquadah.org&quot;&gt;awesome&lt;/a&gt;, but I'd like to extend it to support more attributes.&lt;/p&gt;


&lt;p&gt;Pango markup uses &lt;a href=&quot;http://library.gnome.org/devel/glib/stable/glib-Simple-XML-Subset-Parser.html&quot;&gt;GMarkup API&lt;/a&gt; to parse the formatted string. The problem is that there's no way to extend what is parsed, and if a tag is unknown in the pango parser, it will just fail.&lt;/p&gt;


&lt;p&gt;I've tried to implement my own parser with GMarkup, but… When I encounter a tag I don't know but that pango does, I just can't pass it to the pango parser function for this tag, since this pango function is private.&lt;/p&gt;


&lt;p&gt;There was a &lt;a href=&quot;http://mail.gnome.org/archives/gtk-i18n-list/2006-April/msg00011.html&quot;&gt;try to extends the markup parser&lt;/a&gt; 2 years ago, but the patch was crappy since it exposed the private elements of pango markup parsing, which is the bad way to solve this.&lt;/p&gt;


&lt;p&gt;So for now, I've no idea how to do this. I was first using the &lt;a href=&quot;http://git.naquadah.org/?p=awesome.git;a=commitdiff;h=df695e47a1e8c651fb589452418eefd2a1f2c5e9&quot;&gt;bad parsing method with string.h's functions&lt;/a&gt; which I for now reverted, because I do not really like that.&lt;/p&gt;</description>
    
    
    
          <comments>http://julien.danjou.info/blog/index.php/post/2008/04/27/Extending-pango-markup-attributes#comment-form</comments>
      <wfw:comment>http://julien.danjou.info/blog/index.php/post/2008/04/27/Extending-pango-markup-attributes#comment-form</wfw:comment>
      <wfw:commentRss>http://julien.danjou.info/blog/index.php/feed/rss2/comments/461</wfw:commentRss>
      </item>
    
</channel>
</rss>