[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Extra font scaling? (Re: koffice/kspread)
From: Thomas Zander <zander () kde ! org>
Date: 2007-01-14 18:30:07
Message-ID: 200701141930.08584.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 14 January 2007 18:52, Stefan Nikolaus(UNTRUSTED, sender is
<koffice-devel-bounces-+kde.org-zander=kde.org@kde.org>) wrote:
> To bring it to the point: I'd like to let the fonts of the cell content at
> 100 % zoom have the same size as those in the tool-/menubar. And that's not
> the case, if I just rely on QPainter::scale() (see attached sreenshot). If
> I do the extra scaling it fits well. The difference is marginal, but it
> exists. And my crystal ball tells me, that users will ask about that fact.
> (They did already about the font size of the headers in the dot article, as
> you may know.)
> The scaling factors of KZoomHandler depend on X's dpi (aka. ppi) info. For
> me, it's 86x86 dpi. But others may have higher value (about 100 or
> similar), which extends the discrepancy.
Ah, clear. I was wondering what problem you were trying to solve :) Thanks for
the explanation.
If you use the KoZoomHandler this implies that you made your content (the
sheet) a specific size in a real unit. Which implies that what you want is
incompatible with the goals of flake.
After all, if I insert said sheet in a kword doc at 10x10 cm. I want it to be
10x10 cm. DPI be damned. Considering you don't need to change the flke when
printing, think about what would happen if you print on a 600DPI printer for
example ;)
So, one solution is to alter the zoom level you call '100%'. This is very much
what Krita also has. A pixel-for-pixel zoom mode instead of what we normally
use.
Another solution is to pre-process the scale only when you show the sheet in
kspread itself. And leave the shape to be fully scalable when you show it in
another app as a shape-flake.
This pre-processing would take the effective scaling due to the DPI from the
zoomHandler and convert the scaling of the kozoomaction to a proper one based
on that.
If you read the class in question, you either want to get the resolutionX() /
resolutionY() and work your way back from that.
Cheers!
--
Thomas Zander
[Attachment #5 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic