<?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; Ненастраиваемые шрифты по умолчанию]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=35284</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=35284&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Ненастраиваемые шрифты по умолчанию».]]></description>
		<lastBuildDate>Sat, 21 Jun 2014 19:15:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Ненастраиваемые шрифты по умолчанию]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=413684#p413684</link>
			<description><![CDATA[<p>речь про это вот:</p><p><span style="color: #828282">class DefaultDrawingAlgorithm(Drawer):<br />&nbsp; &nbsp; def __init__(self):<br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>self.font_size = 8</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; self._create_fonts()<br />&nbsp; &nbsp; &nbsp; &nbsp; self._create_pens()<br />&nbsp; &nbsp; &nbsp; &nbsp; self._create_brushes()<br />&nbsp; &nbsp; &nbsp; &nbsp; self.fast_draw = False<br />&nbsp; &nbsp; &nbsp; &nbsp; self.outer_padding = OUTER_PADDING</span></p><p><span style="color: #828282">&nbsp; &nbsp; def increment_font_size(self, step=2):<br />&nbsp; &nbsp; &nbsp; &nbsp; self.font_size += step<br />&nbsp; &nbsp; &nbsp; &nbsp; self.small_text_font = get_default_font(self.font_size)<br />&nbsp; &nbsp; &nbsp; &nbsp; self._adjust_outer_padding_to_font_size()<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; def decrement_font_size(self, step=2):<br />&nbsp; &nbsp; &nbsp; &nbsp; if self.font_size &gt; step:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.font_size -= step<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.small_text_font = get_default_font(self.font_size)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self._adjust_outer_padding_to_font_size()</span></p><p><span style="color: #828282">&nbsp; &nbsp; def _adjust_outer_padding_to_font_size(self):<br />&nbsp; &nbsp; &nbsp; &nbsp; if self.font_size &lt; 8:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.outer_padding = OUTER_PADDING * self.font_size / 8<br />&nbsp; &nbsp; &nbsp; &nbsp; else:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.outer_padding = OUTER_PADDING<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; def _create_fonts(self):<br />&nbsp; &nbsp; &nbsp; &nbsp;<strong> self.header_font = get_default_font(12, True)</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; self.small_text_font = get_default_font(self.font_size)<br />&nbsp; &nbsp; &nbsp; &nbsp; self.small_text_font_bold = get_default_font(8, True)</span></p>]]></description>
			<author><![CDATA[null@example.com (overlayer)]]></author>
			<pubDate>Sat, 21 Jun 2014 19:15:56 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=413684#p413684</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ненастраиваемые шрифты по умолчанию]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=413677#p413677</link>
			<description><![CDATA[<div class="quotebox"><cite>overlayer пишет:</cite><blockquote><p>под оффтопиком со шрифтами дело иначе.</p></blockquote></div><p>Возможно я не прав, но что-то из глубин памяти мне подсказывает, что в Windows размер шрифта задается в пунктах (1/72&quot;), а в Linux - в пикселях. Считается, что 4px=3pt. То есть, например, если в Windows шрифт размером 12pt, то шрифт такого же размера в Linux равен 16px (при стандартном 96DPI экрана). Это, если </p><div class="quotebox"><cite>overlayer пишет:</cite><blockquote><p>разрабы кодят в каком-нибудь вендософте</p></blockquote></div><p>Но, надо еще учитывать, что - чем выше DPI экрана, тем меньше визуально размер шрифта.<br />Что же касается</p><div class="quotebox"><cite>overlayer пишет:</cite><blockquote><p>Постоянно наблюдаю подобную <span style="color: #ff0000"><strong>CENSORED</strong></span>, особенно у питонистов или кутешников.</p></blockquote></div><p>не знаю как с python и wxWidgets, но c qt можно попробовать устанавливать шрифты через qtconfig. Или попробовать самому создать в ~/.config/ файл Trolltech.conf:<br /></p><div class="codebox"><pre><code>[Qt]
font=&quot;Liberation Sans,9,-1,5,50,0,0,0,0,0&quot;</code></pre></div><p>где вместо Liberation Sans вписать нужный фонт, а вместо 9 нужный размер. Для приложений qt4 должно сработать, насчет приложений qt5 не очень уверен, хотя говорят, что файл для них такой же.</p>]]></description>
			<author><![CDATA[null@example.com (urfin)]]></author>
			<pubDate>Sat, 21 Jun 2014 18:21:12 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=413677#p413677</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ненастраиваемые шрифты по умолчанию]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=413663#p413663</link>
			<description><![CDATA[<p>Не, про &quot;размер шрифта, задаваемый переменной окружения&quot; это я спрашиваю)) К сожалению, видел эту восьмерку не единожды, поэтому и выпадаю в осадок - на современных мониторах с нормальным разрешением это адЪ. Gtk-приложения просто подхватывают системный шрифт, и никаких проблем, но все кутешно-питоновое (а еще wxWidgets например) тупо используют свои умолчания.. Возможно, дело в том, что приложения - кроссплатформенные, а разрабы кодят в каком-нибудь вендософте, и под оффтопиком со шрифтами дело иначе.</p>]]></description>
			<author><![CDATA[null@example.com (overlayer)]]></author>
			<pubDate>Sat, 21 Jun 2014 15:00:32 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=413663#p413663</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ненастраиваемые шрифты по умолчанию]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=413660#p413660</link>
			<description><![CDATA[<p>Не встречал такого, да и про размер шрифта, задаваемый переменной окружения, первый раз слышу. То есть, похоже, править исходник таки придется...</p>]]></description>
			<author><![CDATA[null@example.com (yars)]]></author>
			<pubDate>Sat, 21 Jun 2014 14:51:41 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=413660#p413660</guid>
		</item>
		<item>
			<title><![CDATA[Ненастраиваемые шрифты по умолчанию]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=413657#p413657</link>
			<description><![CDATA[<p>Вот как понять логику тех, у кого в приложении захардкожен размер шрифта &quot;8&quot; (откуда вообще берется эта восемь?) , а конфигуратор &quot;выбрать шрифт&quot; отсутствует?? Я надеюсь, что после смерти они попадут в особый ад, но какого хрена при жизни они клепают такой быдлокод? Постоянно наблюдаю подобную <span style="color: #ff0000"><strong>CENSORED</strong></span>, особенно у питонистов или кутешников. С первыми проще- повозившись с grep`ом еще можно увеличит шрифт до читаемого, но это же шиза: у проекта с версией аж 1.2.4 править исходный код! Или.. может быть я чего-то не знаю, и минимальный размер задается в какой-нибудь переменной среды? Единственный вопрос, который мешает мне спать по ночам <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p>]]></description>
			<author><![CDATA[null@example.com (overlayer)]]></author>
			<pubDate>Sat, 21 Jun 2014 14:25:51 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=413657#p413657</guid>
		</item>
	</channel>
</rss>
