[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Vertical Center Justification
From: |
Richard Destremps |
Subject: |
Re: [ft] Vertical Center Justification |
Date: |
Sat, 17 Oct 2015 13:38:25 -0400 |
Thank you so much for responding. On Monday morning when I am in the office and
I have access to drawings and documentation I will layout the whole thing to
you.
Thanks again.
Rich Destremps
(Cell) 610-533-9482
> On Oct 17, 2015, at 1:21 PM, Werner LEMBERG <address@hidden> wrote:
>
> [On this list, please don't use top-posting but rather interleaved
> posting! This makes it much easier to read the e-mail exchange.]
>
>>> You haven't told us relative to *what* you would like to center the
>>> icon...
>>
>> Good point. I will answer your question.
>
> Unfortunately, you didn't...
>
>> I think it would help our discovery and learning process to explain
>> the typical and usual calculation (algorithm) most "printing
>> devices" use to vertically center justify glyphs within a defined
>> field (text box). Once we understand how this is accomplished we
>> can apply the principle to our special case.
>
> ... since this is far too broad to be of any use. Please send an
> image as an example how you want to vertically center the icons. And
> please don't use the phrase `vertically center justify', which doesn't
> make sense.
>
>> I'm beginning to believe this is accomplished by using the bounding
>> box dimensions and the vertical dimension of the text field and then
>> some basic math to align the centers of the glyph with the center of
>> the text box.
>
> Without *seeing* I can't answer that. Vertical centering within a
> text string box looks ugly in most cases, since it ignores the text
> string's baseline. So again, one or two images will help improve the
> answer.
>
>> We are creating a TTF, so all of the font data tables exist. It
>> would be most helpful if you could point out the specific table
>> values to use for this calculation & show us the math algorithm that
>> is used.
>
> Same comment as above.
>
>> Of course, one of the variables in this calculation will be the
>> vertical height of the text box. In our case this is a text box that
>> has been defined as the available marking field by our product
>> graphic designers.
>
> Again, you don't give enough context to answer this. Do you want to
> add the graphical objects to an existing font? Or should the font
> contain only graphical objects?
>
>> Can you explain to me how are the text box dimensions passed to the
>> FreeType engine so that position justification can be calculated?
>
> Text box dimensions are *not* passed to FreeType at all. Basically,
> you send FreeType a glyph index (or character code), and it returns a
> bitmap for a specified size that you have to position by yourself.
>
>> One of the things that is confusing us is the fact that the FreeType
>> engine is perfectly centering the glyph horizontally but not
>> vertically.
>
> FreeType doesn't center by itself! It simply returns what the font
> contains.
>
> It seems there is a fundamental misunderstanding and/or
> miscommunication due to lack of information. So please explain in
> *much* more detail – with examples.
>
>
> Werner