<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=24155</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=24155&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Установка шрифтов в Magick++ (ImageMagick для C++)».]]></description>
		<lastBuildDate>Fri, 07 Sep 2012 09:15:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297472#p297472</link>
			<description><![CDATA[<p>:facepalm: по локоть...<br />Я истерзал гугл и оф. сайт, но не обратил внимания на второй конструктор...</p><p>Большое спасибо! Какой формат пива предпочтителен?&nbsp; <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p>]]></description>
			<author><![CDATA[null@example.com (Storm)]]></author>
			<pubDate>Fri, 07 Sep 2012 09:15:02 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297472#p297472</guid>
		</item>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297459#p297459</link>
			<description><![CDATA[<p>для списка шрифтов пользуй: convert -list font<br />никакие «fully qualified X font names» указывать не надо... просто обычное название, что после Font: стоит... <br />видать доки писались в те времена, когда шрифты были глупые, растровые и ни кто окромя иксов о них ничего поведать не мог...<br />отрендарил пару картинок с:<br /></p><div class="codebox"><pre><code>// отрендерил пару картинок с:
    draw_list.push_back(DrawableFont(&quot;Dejavu-Sans-Mono-Book&quot;));
    draw_list.push_back(DrawablePointSize(20));</code></pre></div><p>// и с:<br />&nbsp; &nbsp; draw_list.push_back(DrawableFont(&quot;Dejavu&quot;, NormalStyle, 400, NormalStretch));</p><br /><p>ЗЫ: если и правда так правильно, то с тебя пиво...</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Fri, 07 Sep 2012 07:11:10 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297459#p297459</guid>
		</item>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297441#p297441</link>
			<description><![CDATA[<div class="codebox"><pre><code>#include &lt;cstdlib&gt;
#include &lt;list&gt;
#include &lt;iostream&gt;
using namespace std;

#include &lt;Magick++.h&gt;
using namespace Magick;

/*
 * 
 */
int main (int argc, char** argv)
{
    InitializeMagick(*argv);
    
    Image image = Image(&quot;180x100&quot;, &quot;white&quot;);
    
    list&lt;Drawable&gt; draw_list;
    
    // set the text font: the font is specified via a string representing
    // a fully qualified X font name (wildcards &#039;*&#039; are allowed)
    
    //draw_list.push_back(DrawableFont(&quot;-*-droid sans-*-*-*-*-*-*-*-*-*-*-*-ru&quot;));  //    &lt;=--  настройка шрифта
    
    // -misc-fixed-medium-o-semicondensed—13-*-*-*-c-60-iso8859-1
    // -*-droid sans-*-*-*-*-*-*-*-*-*-*-*-ru    
    
    // set the text to be drawn at specified position
    draw_list.push_back(DrawableText(10, 10, &quot;Один два три&quot;));

    // set the text color (the fill color must be set to transparent)
    draw_list.push_back(DrawableStrokeColor(Color(&quot;black&quot;)));
    draw_list.push_back(DrawableFillColor(Color(0, 0, 0, MaxRGB)));

    image.draw(draw_list);

    try
    {
        image.write(&quot;output_image.png&quot;);
    }
    catch (Exception &amp;error_)
    {
        cout &lt;&lt; &quot;Caught exception: &quot; &lt;&lt; error_.what() &lt;&lt; endl;
        return 1;
    }

    return 0;
}</code></pre></div><div class="codebox"><pre><code>g++ -c -g -I/usr/include/ImageMagick -I. -MMD -MP -MF main.o.d -o main.o main.cpp
g++ `Magick++-config --cppflags --cxxflags --ldflags --libs` -o grm main.o</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Storm)]]></author>
			<pubDate>Fri, 07 Sep 2012 05:21:51 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297441#p297441</guid>
		</item>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297409#p297409</link>
			<description><![CDATA[<p>шут его знает... <br />если выложишь минимальный компилируемый пример - могу посмотреть...</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Thu, 06 Sep 2012 17:18:01 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297409#p297409</guid>
		</item>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297272#p297272</link>
			<description><![CDATA[<p>Выбираю в ней шрифт, использую его в исходнике, в результате ошибки <br /></p><div class="quotebox"><blockquote><p>Resource temporarily unavailable @ error/xwindow.c/XBestFont/831</p></blockquote></div><p>нет, но и текст на картинке не отрисовывается.</p>]]></description>
			<author><![CDATA[null@example.com (Storm)]]></author>
			<pubDate>Thu, 06 Sep 2012 07:23:32 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297272#p297272</guid>
		</item>
		<item>
			<title><![CDATA[Re: Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297169#p297169</link>
			<description><![CDATA[<p>в сторону <strong>xfontsel</strong> стоит подумать...</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Wed, 05 Sep 2012 13:40:04 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297169#p297169</guid>
		</item>
		<item>
			<title><![CDATA[Установка шрифтов в Magick++ (ImageMagick для C++)]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297166#p297166</link>
			<description><![CDATA[<p>Нужно иметь возможность выводить на картинках текст. <br />В документации к Magick++ говорится про некие &quot;fully qualified X font names&quot;, и эти строки, большая часть содержания которых мне не ясна, используются для указания какой шрифт использовать при отрисовке надписи.</p><p>Вот кусок из руководства:<br /></p><div class="quotebox"><cite>Magick++ tutorial пишет:</cite><blockquote><p>DrawableFont::DrawableFont(const string&amp; font_name) // &#039;font_name&#039; is a string containing<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // a fully qualified X font name<br />// Following is a listing of several font names generally available on Linux systems<br />// (fully qualified X font names)<br />// &quot;-*-helvetica-[medium/bold]-[r/o]-normal-*-*-[80/100/120/140/180]-75-75-*-*-iso8859-1&quot;<br />//<br />» typical usage size is 120<br />// &quot;-misc-fixed-[medium/bold]-[r/o]-[normal/semicondensed]-*-*-[100/120/140/200]-75-75-*-*-iso8859-1&quot;;<br />//<br />» typical usage size is 120, and for this size all combinations are valid<br />//<br />» for all other sizes the combinations are restricted, but the ...-medium-r-normal-...<br />//</p><p>font variants work for all sizes<br />// Example of setting up a DrawableFont object<br />DrawableFont(&quot;-*-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-1&quot;);</p></blockquote></div><p>Проблема в том что, я не могу выяснить какие &quot;fully qualified X font names&quot; доступны в моей системе. <br />Если я использую настройки из приведенного фрагмента, текст не отрисовывается. Если я просто закомментирую строку с этой настройкой - отрисовывается, видимо каким-то стандартным шрифтом.</p><div class="codebox"><pre><code>identify -list font</code></pre></div><p>выдает довольно обширный список, но как из него получить &quot;fully qualified X font names&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (Storm)]]></author>
			<pubDate>Wed, 05 Sep 2012 12:58:33 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297166#p297166</guid>
		</item>
	</channel>
</rss>
