← Back to team overview

kicad-developers team mailing list archive

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

 

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


Follow ups

References