Re: [Interest] Qt5 font size issue with fontconfig

2020-11-21 Thread Thiago Macieira
On Saturday, 21 November 2020 06:05:13 PST Ramakanth Kesireddy wrote:
> Hello Thiago,
> 
> Couple of questions..May I know why we don't see the large font issue in
> ubuntu though Qt5 is configured with -qt-xcb and fontconfig as the point
> sizes that work for ubuntu are not applicable for target?

I have no clue. Try reconfiguring your build so it says "yes (system)" for 
almost everything, and especially anything related to fonts (fontconfig and 
freetype)

Qt Gui:
  Accessibility .. yes
  FreeType ... yes
Using system FreeType  yes
  HarfBuzz ... yes
Using system HarfBuzz  yes
  Fontconfig . yes

Second, what is the font DPI configured to in both cases? Please provide the 
xrandr output and the qtdiag section related to screens.

> Does it makes sense to check the below suggested env variables only on
> target with large lcd size 10" instead of ubuntu as the fonts used are
> different in X11 and the graphics rendering being different namely linuxFB?

I am talking only about X11. I have no clue about LinuxFB.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-21 Thread Ramakanth Kesireddy
Hello Thiago,

Couple of questions..May I know why we don't see the large font issue in
ubuntu though Qt5 is configured with -qt-xcb and fontconfig as the point
sizes that work for ubuntu are not applicable for target?

Does it makes sense to check the below suggested env variables only on
target with large lcd size 10" instead of ubuntu as the fonts used are
different in X11 and the graphics rendering being different namely linuxFB?

Best Regards,
Ramakanth

On Sun, 15 Nov, 2020, 12:41 Ramakanth Kesireddy, 
wrote:

> Thanks a lot for your mail. It helps.
> Essentially moved
> https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop from pixels to
> points and fixed the hardcoded layouts.
> Adjusting the QT_AUTO_SCREEN_SCALE_FACTOR and QT_FONT_DPI to scale
> ccordingly.
>
> On Wed, Nov 11, 2020 at 11:51 PM Thiago Macieira <
> thiago.macie...@intel.com> wrote:
>
>> On Wednesday, 11 November 2020 09:24:14 PST Ramakanth Kesireddy wrote:
>> > Inorder to adjust across all the screens, do I need to set export
>> > QT_AUTO_SCREEN_SCALE_FACTOR=1?
>>
>> Yes. Or set the QT_SCREEN_SCALE_FACTORS variable. Or both, or set the
>> AUTO one
>> to 0. They interact in weird and sometimes counter-intuitive ways.
>>
>> On my laptop, I have:
>> QT_AUTO_SCREEN_SCALE_FACTOR=0
>> QT_SCREEN_SCALE_FACTORS=2;2
>>
>> And X was is started with the command-line option "-dpi 216".
>> --
>> Thiago Macieira - thiago.macieira (AT) intel.com
>>   Software Architect - Intel DPG Cloud Engineering
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
>>
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-14 Thread Ramakanth Kesireddy
Thanks a lot for your mail. It helps.
Essentially moved https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop
from pixels to points and fixed the hardcoded layouts.
Adjusting the QT_AUTO_SCREEN_SCALE_FACTOR and QT_FONT_DPI to scale
ccordingly.

On Wed, Nov 11, 2020 at 11:51 PM Thiago Macieira 
wrote:

> On Wednesday, 11 November 2020 09:24:14 PST Ramakanth Kesireddy wrote:
> > Inorder to adjust across all the screens, do I need to set export
> > QT_AUTO_SCREEN_SCALE_FACTOR=1?
>
> Yes. Or set the QT_SCREEN_SCALE_FACTORS variable. Or both, or set the AUTO
> one
> to 0. They interact in weird and sometimes counter-intuitive ways.
>
> On my laptop, I have:
> QT_AUTO_SCREEN_SCALE_FACTOR=0
> QT_SCREEN_SCALE_FACTORS=2;2
>
> And X was is started with the command-line option "-dpi 216".
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-12 Thread Florian Bruhin
On Thu, Nov 12, 2020 at 10:01:23AM +, Hamish Moffatt wrote:
> 
> On 12/11/20 8:47 pm, Florian Bruhin wrote:
> > On Thu, Nov 12, 2020 at 12:37:33AM +, Hamish Moffatt wrote:
> > > On 12/11/20 2:46 am, Thiago Macieira wrote:
> > > > NEVER calculate font sizes in pixels. Your design is wrong. Delete this
> > > > function and use point sizes throughout.
> > > Too bad the Qt Widget stylesheet function only supports point sizes for
> > > fonts.
> > Not sure what makes you think so:
> > https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop
> > "The font size. In this version of Qt, only pt and px metrics are
> > supported."
> > 
> What I meant was ONLY font sizes can be specified in points. Other
> dimensions (max-height for example) can't be specified in pt.

Ah, right, sorry :)

You can (at least according to the docs) specify other sizes in em or ex
(i.e. relative to the font size) though.

Florian

-- 
m...@the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org 
   https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
 I love long mails! | https://email.is-not-s.ms/


signature.asc
Description: PGP signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-12 Thread Hamish Moffatt

On 12/11/20 8:47 pm, Florian Bruhin wrote:

On Thu, Nov 12, 2020 at 12:37:33AM +, Hamish Moffatt wrote:

On 12/11/20 2:46 am, Thiago Macieira wrote:

NEVER calculate font sizes in pixels. Your design is wrong. Delete this
function and use point sizes throughout.

Too bad the Qt Widget stylesheet function only supports point sizes for
fonts.

Not sure what makes you think so:
https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop
"The font size. In this version of Qt, only pt and px metrics are
supported."

What I meant was ONLY font sizes can be specified in points. Other 
dimensions (max-height for example) can't be specified in pt.



Hamish

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-12 Thread Florian Bruhin
On Thu, Nov 12, 2020 at 12:37:33AM +, Hamish Moffatt wrote:
> On 12/11/20 2:46 am, Thiago Macieira wrote:
> > 
> > NEVER calculate font sizes in pixels. Your design is wrong. Delete this
> > function and use point sizes throughout.
> 
> Too bad the Qt Widget stylesheet function only supports point sizes for
> fonts.

Not sure what makes you think so:
https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop
"The font size. In this version of Qt, only pt and px metrics are
supported."

Florian

-- 
m...@the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org 
   https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
 I love long mails! | https://email.is-not-s.ms/


signature.asc
Description: PGP signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-11 Thread Hamish Moffatt

On 12/11/20 2:46 am, Thiago Macieira wrote:


NEVER calculate font sizes in pixels. Your design is wrong. Delete this
function and use point sizes throughout.



Too bad the Qt Widget stylesheet function only supports point sizes for 
fonts. Points don't work for any other measurements,



Hamish

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-11 Thread Thiago Macieira
On Wednesday, 11 November 2020 09:24:14 PST Ramakanth Kesireddy wrote:
> Inorder to adjust across all the screens, do I need to set export
> QT_AUTO_SCREEN_SCALE_FACTOR=1?

Yes. Or set the QT_SCREEN_SCALE_FACTORS variable. Or both, or set the AUTO one 
to 0. They interact in weird and sometimes counter-intuitive ways.

On my laptop, I have:
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=2;2

And X was is started with the command-line option "-dpi 216".
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-11 Thread Ramakanth Kesireddy
Ok Thanks for your mail.
Yes moved to point size.

Though I set the application font in point size being 12pt(default font
point size), it doesn't adjusts accordingly across all UI screens or rest
of application. For example, the pushbutton font text appears larger.

Inorder to adjust across all the screens, do I need to set export
QT_AUTO_SCREEN_SCALE_FACTOR=1?

On Wed, 11 Nov, 2020, 21:19 Thiago Macieira, 
wrote:

> On Tuesday, 10 November 2020 21:23:12 PST Ramakanth Kesireddy wrote:
> > Hello Thiago,
> >
> > In our application, based on DPI 141(screen size: 5.7" 480X640), the
> > application font is set as 7pt based on the below calculation where px is
> > 14 to look the font normal.
>
> Does your system know that its screen size is 5.7"? That is, is the
> monitor
> offering the correct information to XRandR? Run the "xrandr" tool and it
> will
> tell you. Please also paste here the "Screens" section of qtdiag.
>
> > double pxToPt(double px, double dpi) {
> > return px*72/dpi
> > }
>
> NEVER calculate font sizes in pixels. Your design is wrong. Delete this
> function and use point sizes throughout.
>
> > so that it scales for the 8" or 10" display? Though we need to convert
> > existing pixel size to point sizes in the application code and use
> layouts
> > in some parts of code instead of setting fixed width or any hardcoded
> > values.
>
> And fix those hardcoded layouts too.
>
> > Incase we need to show larger font, do we need to increment 4pt from the
> > reference 12pt incase it is correct?
>
> You shouldn't need to. But if you have to adjust, the rest of the
> application
> should scale accordingly.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-11 Thread Thiago Macieira
On Tuesday, 10 November 2020 21:23:12 PST Ramakanth Kesireddy wrote:
> Hello Thiago,
> 
> In our application, based on DPI 141(screen size: 5.7" 480X640), the
> application font is set as 7pt based on the below calculation where px is
> 14 to look the font normal.

Does your system know that its screen size is 5.7"? That is, is the monitor 
offering the correct information to XRandR? Run the "xrandr" tool and it will 
tell you. Please also paste here the "Screens" section of qtdiag.

> double pxToPt(double px, double dpi) {
> return px*72/dpi
> }

NEVER calculate font sizes in pixels. Your design is wrong. Delete this 
function and use point sizes throughout.

> so that it scales for the 8" or 10" display? Though we need to convert
> existing pixel size to point sizes in the application code and use layouts
> in some parts of code instead of setting fixed width or any hardcoded
> values.

And fix those hardcoded layouts too.

> Incase we need to show larger font, do we need to increment 4pt from the
> reference 12pt incase it is correct?

You shouldn't need to. But if you have to adjust, the rest of the application 
should scale accordingly.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-10 Thread Ramakanth Kesireddy
Hello Thiago,

In our application, based on DPI 141(screen size: 5.7" 480X640), the
application font is set as 7pt based on the below calculation where px is
14 to look the font normal.

double pxToPt(double px, double dpi) {
return px*72/dpi
}

but the font size on target is small even though we set QCoreApplication::
setAttribute(Qt::AA_EnableHighDpiScaling);

So if we use default font to retrieve the default font point size, it shows
as 12pt which looks font size normal on display.
QFont f;
int defaultFontSize = f.pointSize();

Question is if we need to use default font point size for the current
reference DPI display and set QCoreApplication::setAttribute(Qt::
AA_EnableHighDpiScaling)
so that it scales for the 8" or 10" display? Though we need to convert
existing pixel size to point sizes in the application code and use layouts
in some parts of code instead of setting fixed width or any hardcoded
values.

Incase we need to show larger font, do we need to increment 4pt from the
reference 12pt incase it is correct?

Appreciate for your feedback in this regard.

Best Regards,
Ramakanth

On Sun, 8 Nov, 2020, 21:30 Thiago Macieira, 
wrote:

> On Saturday, 7 November 2020 00:28:50 PST Ramakanth Kesireddy wrote:
> > Ok Thanks for your mail. Forgot to mention that Qt UI is based on
> > QWidgets(QPainter) with unicodes.
> >
> > Is this the reason why auto scale attribute doesn't works and need to use
> > QFontmetrics to set point size for the DPI accordingly?
>
> I do not understand you.
>
> What isn't working properly? Please describe without comparing to Qt 4.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-08 Thread Thiago Macieira
On Saturday, 7 November 2020 00:28:50 PST Ramakanth Kesireddy wrote:
> Ok Thanks for your mail. Forgot to mention that Qt UI is based on
> QWidgets(QPainter) with unicodes.
> 
> Is this the reason why auto scale attribute doesn't works and need to use
> QFontmetrics to set point size for the DPI accordingly?

I do not understand you.

What isn't working properly? Please describe without comparing to Qt 4.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-07 Thread Stan Morris
If targeting an embedded device you know the DPI and can use it to set
pixelSize and width/height like so:
  Text { pixelSize: 24*UI.pt }
  Rectangle { width: 12*UI.cm; height: 6*UI.cm }

Example: https://github.com/pixelgrease/Qt-logical-units

From: Ramakanth Kesireddy 
> To: Marc Van Daele 
> Cc: Qt Interest 
> Bcc:
> Date: Fri, 6 Nov 2020 18:30:15 +0530
> Subject: Re: [Interest] Qt5 font size issue with fontconfig
> Nope this didn't help. If setting pointsize appropriately for current
> display 141 dpi would help to scale for other displays of different screen
> sizes in future?
>
> Is there any formula to calculate the font size in point size based on dpi
> display which would work for all display sizes or just setting point size
> would help?
>
> Best Regards,
> Ramakanth
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-07 Thread Ramakanth Kesireddy
Ok Thanks for your mail. Forgot to mention that Qt UI is based on
QWidgets(QPainter) with unicodes.

Is this the reason why auto scale attribute doesn't works and need to use
QFontmetrics to set point size for the DPI accordingly?

Best Regards,
Ramakanth

On Fri, 6 Nov, 2020, 21:08 Thiago Macieira, 
wrote:

> On Friday, 6 November 2020 05:00:15 PST Ramakanth Kesireddy wrote:
> > Is there any formula to calculate the font size in point size based on
> dpi
> > display which would work for all display sizes or just setting point size
> > would help?
>
> Officially:
>
> size in inches = size in points / 72 * dots-per-inch
>
> In practice, most display systems do not obey the actual DPI setting.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-06 Thread Thiago Macieira
On Friday, 6 November 2020 05:00:15 PST Ramakanth Kesireddy wrote:
> Is there any formula to calculate the font size in point size based on dpi
> display which would work for all display sizes or just setting point size
> would help?

Officially:

size in inches = size in points / 72 * dots-per-inch

In practice, most display systems do not obey the actual DPI setting.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-06 Thread Ramakanth Kesireddy
Nope this didn't help. If setting pointsize appropriately for current
display 141 dpi would help to scale for other displays of different screen
sizes in future?

Is there any formula to calculate the font size in point size based on dpi
display which would work for all display sizes or just setting point size
would help?

Best Regards,
Ramakanth

On Sat, 31 Oct, 2020, 18:02 Marc Van Daele, 
wrote:

> Does setting
> QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
>
> help?  This should be more or less the first line in your code.
>
>
> Marc
>
>
> On Sat, 31 Oct 2020 at 12:31, Ramakanth Kesireddy 
> wrote:
>
>> Hi,
>>
>> After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
>> with fontconfig, the font sizes appear larger on target.
>>
>> The Qt 4.8 application font size setting with 14pt default font appears
>> larger in Qt 5.6.3 with fontconfig and needed fonts added in default
>> fontconfig directory /usr/share/fonts.
>> The dpi of the device is 141.
>>
>> Do I need to reduce the font size pt or set any environment variable
>> scale factor so that text appears normal?
>>
>> Any suggestions are much appreciated.
>>
>> Thanks and Regards,
>> Ramakanth
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
>>
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-03 Thread Thiago Macieira
On Monday, 2 November 2020 23:26:49 PST Ramakanth Kesireddy wrote:
> Couldn't find the font size Qt 4.8 bug that is fixed for Qt 5 with font
> config in the Qt bug tracker.
> 
> Appreciate if it is possible to share the same.

I doubt there is a report. Simply accept that Qt 5 is right and Qt 4 is wrong.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-02 Thread Ramakanth Kesireddy
Hello Thiago,

Thanks for your mail.

Am wondering if we need to set
Qcoreapplication::setAttribute(Qt::AA_EnableHighDPI as the dpi of the
device is 141 only or reduce the point size across UI and converting pixels
being used to pt sizes with fontconfig in Qt5?

Couldn't find the font size Qt 4.8 bug that is fixed for Qt 5 with font
config in the Qt bug tracker.

Appreciate if it is possible to share the same.

Best Regards,
Ramakanth

On Sun, 1 Nov, 2020, 22:47 Thiago Macieira, 
wrote:

> On Sunday, 1 November 2020 01:12:59 PST Ramakanth Kesireddy wrote:
> > Thanks a lot for your feedback.
> > Could you please let me know the bug that has been fixed in Qt 4.8?
>
> Yes, Qt 5 supports HighDPI.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-01 Thread Thiago Macieira
On Sunday, 1 November 2020 01:12:59 PST Ramakanth Kesireddy wrote:
> Thanks a lot for your feedback.
> Could you please let me know the bug that has been fixed in Qt 4.8?

Yes, Qt 5 supports HighDPI.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-01 Thread Ramakanth Kesireddy
Thanks a lot for your feedback.
Could you please let me know the bug that has been fixed in Qt 4.8?
Yes shall reduce the point size as it appears the font size is large unlike
Qt4.8 and the text is truncated in table view rows and other text in UI.

Shall upgrade the version early next year either Qt 5.12 or Qt6.

Best Regards,
Ramakanth

On Sun, Nov 1, 2020 at 3:24 AM Thiago Macieira 
wrote:

> On Saturday, 31 October 2020 04:34:08 PDT Ramakanth Kesireddy wrote:
> > Hi,
> >
> > After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
> > with fontconfig, the font sizes appear larger on target.
> >
> > The Qt 4.8 application font size setting with 14pt default font appears
> > larger in Qt 5.6.3 with fontconfig and needed fonts added in default
> > fontconfig directory /usr/share/fonts.
> > The dpi of the device is 141.
> >
> > Do I need to reduce the font size pt or set any environment variable
> scale
> > factor so that text appears normal?
>
> Most likely, Qt 5 is displaying the fonts correctly and Qt 4 isn't because
> Qt
> 4 didn't support HighDPI.
>
> In other words, the bug that existed has been fixed. If your UX people
> thing
> it's too bug, then reduce the size.
>
> Also, upgrade to at least 5.12.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-10-31 Thread Thiago Macieira
On Saturday, 31 October 2020 04:34:08 PDT Ramakanth Kesireddy wrote:
> Hi,
> 
> After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
> with fontconfig, the font sizes appear larger on target.
> 
> The Qt 4.8 application font size setting with 14pt default font appears
> larger in Qt 5.6.3 with fontconfig and needed fonts added in default
> fontconfig directory /usr/share/fonts.
> The dpi of the device is 141.
> 
> Do I need to reduce the font size pt or set any environment variable scale
> factor so that text appears normal?

Most likely, Qt 5 is displaying the fonts correctly and Qt 4 isn't because Qt 
4 didn't support HighDPI.

In other words, the bug that existed has been fixed. If your UX people thing 
it's too bug, then reduce the size.

Also, upgrade to at least 5.12.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt5 font size issue with fontconfig

2020-10-31 Thread Marc Van Daele
Does setting
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

help?  This should be more or less the first line in your code.


Marc


On Sat, 31 Oct 2020 at 12:31, Ramakanth Kesireddy 
wrote:

> Hi,
>
> After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
> with fontconfig, the font sizes appear larger on target.
>
> The Qt 4.8 application font size setting with 14pt default font appears
> larger in Qt 5.6.3 with fontconfig and needed fonts added in default
> fontconfig directory /usr/share/fonts.
> The dpi of the device is 141.
>
> Do I need to reduce the font size pt or set any environment variable scale
> factor so that text appears normal?
>
> Any suggestions are much appreciated.
>
> Thanks and Regards,
> Ramakanth
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt5 font size issue with fontconfig

2020-10-31 Thread Ramakanth Kesireddy
Hi,

After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
with fontconfig, the font sizes appear larger on target.

The Qt 4.8 application font size setting with 14pt default font appears
larger in Qt 5.6.3 with fontconfig and needed fonts added in default
fontconfig directory /usr/share/fonts.
The dpi of the device is 141.

Do I need to reduce the font size pt or set any environment variable scale
factor so that text appears normal?

Any suggestions are much appreciated.

Thanks and Regards,
Ramakanth
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest