<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Adding fonts]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8183</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8183&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Adding fonts.]]></description>
		<lastBuildDate>Sat, 18 Jun 2022 17:48:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Adding fonts]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45057#p45057</link>
			<description><![CDATA[<p>which procedure I adopt? and which is the best?</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sat, 18 Jun 2022 17:48:17 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45057#p45057</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding fonts]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45049#p45049</link>
			<description><![CDATA[<p>Hello unforgettable</p><p>A proven MVD script:</p><p>procedure Form1_OnShow (Sender: string; Action: string);<br />begin<br />&nbsp; &nbsp; Form1.GridEmployees.Font := LoadFont;<br />end;</p><p>procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);<br />var&nbsp; &nbsp; FontDialog: TFontDialog;<br />begin<br />&nbsp; &nbsp; FontDialog := TFontDialog.Create(Form1);<br />&nbsp; &nbsp; FontDialog.Font := Form1.GridEmployees.Font;<br />&nbsp; &nbsp; if FontDialog.Execute then<br />&nbsp; &nbsp; begin<br />&nbsp; &nbsp; &nbsp; &nbsp; Form1.GridEmployees.Font:= FontDialog.Font;<br />&nbsp; &nbsp; &nbsp; &nbsp; Form1.GridEmployees.dbUpdate;<br />&nbsp; &nbsp; &nbsp; &nbsp; SaveFont(Form1.GridEmployees.Font);<br />&nbsp; &nbsp; end;<br />end;</p><p>procedure SaveFont(Font: TFont);<br />var&nbsp; &nbsp;reg: TRegistry;<br />begin<br />&nbsp; &nbsp; &nbsp;reg := TRegistry.Create;<br />&nbsp; &nbsp; &nbsp;reg.Access := KEY_ALL_ACCESS;<br />&nbsp; &nbsp; &nbsp;reg.RootKey := HKEY_CURRENT_USER;</p><p>&nbsp; &nbsp; &nbsp;if reg.OpenKey(&#039;software\YourProjectName&#039;, true) then<br />&nbsp; &nbsp; &nbsp;begin<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteString(&#039;Font.Name&#039;, Font.Name);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteInteger(&#039;Font.Size&#039;, Font.Size);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteBool(&#039;Font.Style.fsBold&#039;, fsBold in [Font.Style]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteBool(&#039;Font.Style.fsItalic&#039;, fsItalic in [Font.Style]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteBool(&#039;Font.Style.fsUnderline&#039;, fsUnderline in [Font.Style]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteBool(&#039;Font.Style.fsStrikeOut&#039;, fsStrikeOut in [Font.Style]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reg.CloseKey;<br />&nbsp; &nbsp; &nbsp;end;</p><p>&nbsp; &nbsp; &nbsp;reg.Free;<br />end;</p><br /><p>function LoadFont: TFont;<br />var&nbsp; &nbsp;reg: TRegistry;<br />begin<br />&nbsp; &nbsp; &nbsp;result := TFont.Create;<br />&nbsp; &nbsp; &nbsp;reg := TRegistry.Create;<br />&nbsp; &nbsp; &nbsp;reg.Access := KEY_ALL_ACCESS;<br />&nbsp; &nbsp; &nbsp;reg.RootKey := HKEY_CURRENT_USER;</p><p>&nbsp; &nbsp; &nbsp;if reg.OpenKey(&#039;software\YourProjectName&#039;, true) then<br />&nbsp; &nbsp; &nbsp;begin<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Name&#039;) then result.Name := Reg.ReadString(&#039;Font.Name&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Size&#039;) then result.Size := Reg.ReadInteger(&#039;Font.Size&#039;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Style.fsBold&#039;) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if Reg.ReadBool(&#039;Font.Style.fsBold&#039;) then result.Style := result.Style + fsBold;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Style.fsItalic&#039;) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if Reg.ReadBool(&#039;Font.Style.fsItalic&#039;) then result.Style := result.Style + fsItalic;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Style.fsUnderline&#039;) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if Reg.ReadBool(&#039;Font.Style.fsUnderline&#039;) then result.Style := result.Style + fsUnderline;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if reg.ValueExists(&#039;Font.Style.fsStrikeOut&#039;) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if Reg.ReadBool(&#039;Font.Style.fsStrikeOut&#039;) then result.Style := result.Style + fsStrikeOut;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reg.CloseKey;<br />&nbsp; &nbsp; &nbsp;end;</p><p>&nbsp; &nbsp; &nbsp;reg.Free;<br />end;</p><p>JB</p>]]></description>
			<author><![CDATA[null@example.com (jean.brezhonek)]]></author>
			<pubDate>Sat, 18 Jun 2022 06:17:26 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45049#p45049</guid>
		</item>
		<item>
			<title><![CDATA[Adding fonts]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45047#p45047</link>
			<description><![CDATA[<p>Hi everyone,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Can any one tell how we can add fonts of other language like Arabic, Persian or Urdu in MVD? Is it possible?</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Fri, 17 Jun 2022 17:45:18 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45047#p45047</guid>
		</item>
	</channel>
</rss>
