Code Monkey home page Code Monkey logo

Comments (9)

riuson avatar riuson commented on August 15, 2024

From [email protected] on May 21, 2014 21:48:45

Status: Accepted
Owner: [email protected]

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on June 03, 2014 10:44:46

Something changed or broken between Qt 4.8.6 and Qt 5.1.1 ...

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on June 07, 2014 23:45:12

Try this: http://sourceforge.net/projects/lcd-image-converter/files/beta/lcd-image-converter-20140608-beta.zip/download -----------------------------------------------

Test source:

#include "mainwindow.h"
#include "ui_mainwindow.h"

#include
#include

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);

QString family = "Anonymous Pro";
QFontDatabase fonts;

QStringList styles = fonts.styles(family);
qDebug() << styles;

}

MainWindow::~MainWindow()
{
delete ui;
}

Qt 4.8.6 output:
("Bold", "Bold Italic", "Italic", "Normal")

Qt 5.1.1 output:
("Bold", "Bold Italic")

Status: Started

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on June 17, 2014 11:06:32

It works, thanks. Still the project team might think about how to create font files for the OpenType fonts with specified weights, instead of their TrueType corresponding versions, which in many cases there might be any. I have confirmed at least lcd-image-converter recognizes the fonts windows platform supports.

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on June 18, 2014 05:08:33

Hmm... Give me example, please.
I have installed first found OpenType ( http://www.fontspace.com/gluk/foglihtenno07 ) and it works, as i can see.

Attachment: foglihten.png

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on August 16, 2014 11:09:17

Archive with Anonymous Pro font contains 4 files:

Anonymous Pro "Bold Italic",
Anonymous Pro "Bold",
Anonymous Pro "Italic",
Anonymous Pro "Regular".

If you install "Bold", 2 styles will be accessible: ("Bold", "Bold Italic").
"Italic" -> ("Italic", "Bold Italic").
"Bold Italic" -> ("Bold Italic").
"Regular" -> ("Normal", "Bold", "Italic", "Bold Italic").

"Regular", "Italic" -> ("Normal", "Bold", "Italic", "Bold Italic").
"Regular", "Italic", "Bold" -> ("Normal", "Bold", "Italic", "Bold Italic").
"Regular", "Italic", "Bold", "Bold Italic" -> ("Normal", "Bold", "Italic", "Bold Italic").
"Regular", "Bold", "Bold Italic", "Italic" -> ("Normal", "Bold", "Italic", "Bold Italic").

"Bold", "Bold Italic", "Italic" and "Regular" -> ("Bold", "Bold Italic").
"Italic", "Bold", "Bold Italic" and "Regular" -> ("Italic", "Bold Italic").
"Italic", "Bold", "Bold Italic" -> ("Italic", "Bold Italic").
...

So, just install only "Regular" font (Anonymous Pro.ttf) or change order of files installation.
I think there is a bug in Qt font database filling.

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on August 17, 2014 01:09:18

Qt on Windows enumerates fonts using WinAPI function EnumFontFamiliesEx ( http://msdn.microsoft.com/en-us/library/dd162620%28VS.85%29.aspx ).
"If there are two fonts with the same name, only one is enumerated".

When font added to database:

add original font;
// add fonts windows can generate for us:
if (fontWeight <= DemiBold) {
add original font with Bold weight;
}
if (fontStyle not Italic) {
add original font with Italic style;
}
if ((fontWeight <= DemiBold) and (fontStyle not Italic)) {
add original font with Bold weight + Italic style;
}

If first registered font in family has Regular style, then added Regular, Bold, Italic and Bold Italic.
If first registered font in family has Italic style, then added Italic and Bold Italic.
...

Enumarating fonts with same name don't solve problem.

Attachment: windows notepad.png original.png patched.png

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

From [email protected] on August 17, 2014 03:15:10

I do not know this is a bug or normal behavior. I have created a query in the bug tracker on qt-project... https://bugreports.qt-project.org/browse/QTBUG-40828

from lcd-image-converter.

riuson avatar riuson commented on August 15, 2024

Fixed with Qt 5.4 release.
Downloads: http://sourceforge.net/projects/lcd-image-converter/files/lcd-image-converter-20141214.zip/download
Sources: ff449e0

from lcd-image-converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.