poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tahir Akhtar" <ta...@spectrum-tech.com>
Subject RE: Re[2]: Autosizing question:
Date Thu, 25 Jan 2007 10:37:02 GMT
I agree that the DPI issue is not relevant in auto-sizing context as it is
only a rendering issue. For auto-sizing we only need font sizes for
calculation purpose (we are not doing any rendering in Java). Now we have to
see whether Andy was referring to same issue or something else.

I would love if you can elaborate a bit on "units of 1/256th of a character
width of the default font". Is the default font is system specific or same
across excel versions/platforms? Is a specific character is used for width
calculation or we assume fixed width fonts?

Wassalam
Tahir

-----Original Message-----
From: Yegor Kozlov [mailto:yegor@dinom.ru] 
Sent: Thursday, January 25, 2007 3:19 PM
To: POI Users List
Subject: Re[2]: Autosizing question:

Aha! Thank you for the link.

I think user's DPI is not an issue for autosizing.

Column width in Excel is expressed in units of 1/256th of a character width
of the default font.
In theory, if you calculate width of text and translate it to the XLS
units then the column width should not depend on client's DPI.

 A simple experiment to do: create an xls file, autosize a column and
try to view it on a system with a different DPI.

Regards,
Yegor


TA> I guess the issue is not in the font sizes but the screen dpi
calculation.
TA> Net result is if you render some text in "Ariel, 12" it will appear
smaller
TA> on screen as compared to same text & font rendered by windows natively.
See
TA> this bug report (and related bug 4016591) for details:
TA> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4168757 . 

TA> Wassalam
TA> Tahir

TA> -----Original Message-----
TA> From: Yegor Kozlov [mailto:yegor@dinom.ru] 
TA> Sent: Thursday, January 25, 2007 2:28 PM
TA> To: POI Users List
TA> Subject: Re[2]: Autosizing question:

TA> Are you sure the Java's font sizes are incompatible with Windows fonts?
TA> Could you point me to the source of this information? I plan to add
TA> drawing capabilities to HSLF and this stuff is important to me.

TA> Regards,
TA> Yegor

ACO>> Its actually more compounded than that.  You can basically do this
with
ACO>> Java's AWT Font/FontMetrics classes but the sizes are incompatible
with
ACO>> Windows fonts (let alone Mac et al).  Someone has to record the data
TA> for
ACO>> Windows fonts and or an API that reads the font files and calculates
TA> them.

ACO>> -Andy

ACO>> Avik Sengupta wrote:
>>>> Since VBA have this function to autosize
>>>>     
>>>>> columns, I wonder if POI have
>>>>>       
>>>
>>> POI is not, and was never meant to be, a replacement for VBA. Its a file

>>> format reader/writer. To do autosizing, one needs a fontmetrics 
>>> implementation. We're yet find one that is useful and easy enuf to use. 
>>>
>>> However, as a frequently requested feature, its a ripe oppurtunity for 
>>> contribution :)
>>>
>>> Regards
>>> -
>>> Avik
>>>
>>> On Wednesday 24 January 2007 17:36, Adelbert Groebbens wrote:
>>>   
>>>>> Autosizing question:
>>>>>
>>>>> Hello, is there a way to autosize the specified column
>>>>> in POI? Since VBA have this function to autosize
>>>>> columns, I wonder if POI have, if not, I have to
>>>>> setsize for each column, I think it would waste a lot
>>>>> of resource right? Thanks
>>>>>       
>>>> I'm facing the same problem.
>>>>
>>>> Did you find a solution?
>>>>
>>>> Bret Hart <im2heat <at> yahoo.com> writes:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>>> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
>>>> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>>>>     
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
>>> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>>>
>>>
>>>
>>>   


TA> ---------------------------------------------------------------------
TA> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
TA> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
TA> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




TA> ---------------------------------------------------------------------
TA> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
TA> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
TA> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Mime
View raw message