← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] fix position of text and refdes from PCAD import

 

Previous patch is last patch in my set  
![](https://link.nylas.com/open/ac7n0u7eu8cj6vjow9ajimqdr/65482b56586c4b9dbb43
fab2a8f405b2)

> On Feb 27 2016, at 1:36 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
Hello. Patch that fix a size and a proportional of font.  
![](https://link.nylas.com/open/ac7n0u7eu8cj6vjow9ajimqdr/019b9ecac7464751a90d
673f85ca7ca6)

>

>> On Feb 26 2016, at 8:18 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
Add patch for carret return symbol in text

>>

>>> On Feb 25 2016, at 10:36 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
Next I will fix some other import bugs:

>>>

>>>   * carret return symbol \r -> ?

>>>   * size and proportional of text

>>>   * etc

>>>

>>>> On Feb 25 2016, at 10:30 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
Patch for position text with only justify from imported file. More accuary.

>>>>

>>>>> On Feb 25 2016, at 9:05 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
And it apply only for free text not to refdes and value...

>>>>>

>>>>>> On Feb 25 2016, at 9:01 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
I find that I can select horizontal and vertical justification of Kicad text
but vertical justify don't accessible from GUI. Can I use vertical justify?

>>>>>>

>>>>>>> On Feb 25 2016, at 7:02 pm, Eldar Khayrullin
<eldar.khayrullin@xxxxxxx> wrote:  
I think about this. But in the begining I'll try to use easy way: using
parametr 'extent' and calculate more pretty scale from PCAD to Kicad height
and width  

>>>>>>>

>>>>>>>> On Feb 25 2016, at 2:59 am, Piotr Esden-Tempski
<piotr@xxxxxxxxx> wrote:  

>>>>>>>>

>>>>>>>> Regarding variable width font. I ran into the issue when I was trying
to generate symbols for KiCad. To solve it I have generated a table with glyph
widths from the C code used in KiCad itself. You can find my python table
here: <https://github.com/esden/stm32-kicad-
lib/blob/master/script/kicadlibgen.py>

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>> You might need to rescale the font size to match the KiCad font. So
if you had a similar glyph size table for the PCAD font you might be able to
generate the new text to fit into the same space as the original.

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>> I hope this is helpful in some way.

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>> If you want the code that I used to generate the glyph width table
with let me know.

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>> Cheers,

>>>>>>>>

>>>>>>>> Esden

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>>  

>>>>>>>>

>>>>>>>>> On Feb 24, 2016, at 9:57 AM, Eldar Khayrullin
&lt;[eldar.khayrullin@xxxxxxx](mailto:eldar.khayrullin@xxxxxxx)&gt; wrote:

>>>>>>>>>

>>>>>>>>>  

>>>>>>>>>

>>>>>>>>> Ok, glad to help.  

>>>>>>>>>

>>>>>>>>>> On Feb 24 2016, at 8:55 pm, Wayne Stambaugh
&lt;[stambaughw@xxxxxxxxx](mailto:stambaughw@xxxxxxxxx)&gt; wrote:  

>>>>>>>>>>

>>>>>>>>>> If the differences are due to variable font width issues then there
is  
not much we can do about that. Thanks for fixing this.

>>>>>>>>>>

>>>>>>>>>> On 2/24/2016 11:57 AM, Eldar Khayrullin wrote:  
&gt; PCAD stroke font isn't fixed width font and KiCad font too.  
&gt; I look for possible and try to solve this with more easy way  
&gt;  
&gt; On Feb 24 2016, at 7:51 pm, Wayne Stambaugh
&lt;[stambaughw@xxxxxxxxx](mailto:stambaughw@xxxxxxxxx)&gt;  
&gt; wrote:  
&gt;  
&gt; Eldar,  
&gt;  
&gt; Are you planning on actually determining the appropriate PCAD units for  
&gt; text so that this can be converted accurately? While you patch makes  
&gt; things better, I would prefer that we convert boards as accurately as  
&gt; possible. I know we don't handle different fonts but there should be no  
&gt; reason not to get the text position, height, and with correct.  
&gt;  
&gt; Wayne  
&gt;  
&gt; On 2/24/2016 11:34 AM, Eldar Khayrullin wrote:  
&gt; &gt; Thank you. Not ideal yet, but more truely  
&gt; &gt;  
&gt; &gt; On Feb 24 2016, at 3:00 pm, jp charras
&lt;[jp.charras@xxxxxxxxxx](mailto:jp.charras@xxxxxxxxxx)&gt; wrote:  
&gt; &gt;  
&gt; &gt; Le 23/02/2016 13:36, Eldar Khayrullin a écrit :  
&gt; &gt; &gt; Result  
&gt; &gt; &gt;  
&gt; &gt; &gt;&gt; On Feb 23 2016, at 3:29 pm, Eldar Khayrullin  
&gt; &gt; &gt;
&amp;lt;[eldar.khayrullin@xxxxxxx](mailto:eldar.khayrullin@xxxxxxx)&amp;gt;
wrote:  
&gt; &gt; &gt; Apply Justify of text and flipped flag of text from import
file.  
&gt; &gt;  
&gt; &gt; I committed your patches.  
&gt; &gt; AFAIK, they look good for me.  
&gt; &gt; Thanks.  
&gt; &gt;  
&gt; &gt;  
&gt; &gt; \--  
&gt; &gt; Jean-Pierre CHARRAS  
&gt; &gt;  
&gt; &gt; _______________________________________________  
&gt; &gt; Mailing list: <https://launchpad.net/~kicad-developers>  
&gt; &gt; Post to : [kicad-developers@xxxxxxxxxxxxxxxxxxx](mailto:kicad-
developers@xxxxxxxxxxxxxxxxxxx)  
&gt; &gt; Unsubscribe : <https://launchpad.net/~kicad-developers>  
&gt; &gt; More help : <https://help.launchpad.net/ListHelp>  
&gt; &gt;  
&gt; &gt;  
&gt; &gt;  
&gt; &gt; _______________________________________________  
&gt; &gt; Mailing list: <https://launchpad.net/~kicad-developers>  
&gt; &gt; Post to : [kicad-developers@xxxxxxxxxxxxxxxxxxx](mailto:kicad-
developers@xxxxxxxxxxxxxxxxxxx)  
&gt; &gt; Unsubscribe : <https://launchpad.net/~kicad-developers>  
&gt; &gt; More help : <https://help.launchpad.net/ListHelp>  
&gt; &gt;  
&gt;  
&gt; _______________________________________________  
&gt; Mailing list: <https://launchpad.net/~kicad-developers>  
&gt; Post to : [kicad-developers@xxxxxxxxxxxxxxxxxxx](mailto:kicad-
developers@xxxxxxxxxxxxxxxxxxx)  
&gt; Unsubscribe : <https://launchpad.net/~kicad-developers>  
&gt; More help : <https://help.launchpad.net/ListHelp>  
&gt;

>>>>>>>>>

>>>>>>>>> _______________________________________________  
Mailing list: <https://launchpad.net/~kicad-developers>  
Post to     : [kicad-developers@xxxxxxxxxxxxxxxxxxx](mailto:kicad-
developers@xxxxxxxxxxxxxxxxxxx)  
Unsubscribe : <https://launchpad.net/~kicad-developers>  
More help   : <https://help.launchpad.net/ListHelp>  

>>>>>>>>

>>>>>>>>  


References