![]() Item = fontList - >findItem (PrefsManager :: instance ( ) - >appPrefs. Item = fontList - >findItem (carrier - >doc - >CurrFont, 0 ) Item = fontList - >findItem (carrier - >pluginManager - >dllInput, 0 ) ![]() If ( !carrier - >pluginManager - >dllInput. PsFont = loadIcon ( "font_type1_16.png" ) TtfFont = loadIcon ( "font_truetype16.png" ) Row->setText(4, tr("System", "font preview")) Row->setText(4, tr("User", "font preview")) If (fontIter.current()->fontPath().contains(QDir::homeDirPath())) Row->setText(0, fontIter.current()->SCName) QListViewItem *row = new QListViewItem(fontList) įoi::FontType type = fontIter.current()->typeCode QPixmap psFont = loadIcon("font_type1_16.png") įor (SCFontsIterator fontIter(carrier->Prefs.AvailFonts) fontIter.current() ++fontIter) QPixmap otfFont = loadIcon("font_otf16.png") QPixmap ttfFont = loadIcon("font_truetype16.png") * go through available fonts and check their properties */Ĭarrier - >GetUsedFonts ( &reallyUsedFonts ) SizeLayout - >addWidget (cancelButton ) įontPreviewLayout - >addLayout (mainLayout, 0, 0 ) OkButton = new QPushButton ( this, "okButton" ) ĬancelButton = new QPushButton ( this, "cancelButton" ) SizeSpin - >setValue (prefs - >getUInt ( "fontSize", 18 ) ) īuttonSpacer = new QSpacerItem ( 40, 20, QSizePolicy :: Expanding, QSizePolicy :: Minimum ) SizeSpin = new QSpinBox ( 10, 72, 1, this, "sizeSpin" ) SizeLabel - >setText (tr ( "Font Size:" ) ) SizeLabel = new QLabel ( this, "sizeLabel" ) SizeLayout = new QHBoxLayout ( 0, 0, 5, "sizeLayout" ) MainLayout - >addLayout (searchLayout, 0 ) įontList = new QListView ( this, "fontList" ) įontList - >setAllColumnsShowFocus ( true ) įontList - >setShowSortIndicator ( true ) įontList - >addColumn (tr ( "Font Name", "font preview" ) ) įontList - >addColumn (tr ( "Doc", "font preview" ) ) įontList - >setColumnAlignment ( 1, Qt :: AlignCenter ) įontList - >addColumn (tr ( "Type", "font preview" ) ) įontList - >addColumn (tr ( "Subset", "font preview" ) ) įontList - >setColumnAlignment ( 3, Qt :: AlignCenter ) įontList - >addColumn (tr ( "Access", "font preview" ) ) įontPreview = new QLabel ( this, "fontPreview" ) įontPreview - >setMinimumSize (QSize ( 400, 90 ) ) įontPreview - >setFrameShape (QFrame :: Box ) įontPreview - >setPaletteBackgroundColor (white /* MrB RFE ) paletteBackgroundColor()*/ ) SearchLayout - >addWidget (searchButton ) SearchButton = new QPushButton ( this, "searchButton" ) SearchEdit = new QLineEdit ( this, "searchEdit" ) SearchLayout - >addWidget (searchLabel ) SearchLabel = new QLabel ( this, "searchLabel" ) SearchLayout = new QHBoxLayout ( 0, 0, 5, "searchLayout" ) MainLayout = new QVBoxLayout ( 0, 0, 5, "mainLayout" ) Ysize = prefs - >getUInt ( "ysize", 480 ) įontPreviewLayout = new QGridLayout ( this, 1, 1, 10, 5, "FontPreviewLayout" ) Xsize = prefs - >getUInt ( "xsize", 640 ) SortColumn = prefs - >getUInt ( "sortColumn", 0 ) Prefs = PrefsManager :: instance ( ) - >prefsFile - >getPluginContext ( "fontpreview" ) * The dialog will by default be modeless, unless you set 'modal' toįontPreview :: FontPreview (ScribusApp *carrier, QWidget * parent, const char * name, bool modal, WFlags fl ) * name 'name' and widget flags set to 'f'. * Constructs a FontPreview as a child of 'parent', with the (And if ever, this should probably remain an optional feature.)Īnd yes, I realize that's likely why the font browser exists./*! Main window for "Font Preview" plugin. Not sure how much work it would realistically incur extending the dropdown CellRenderer. Probably requires creating a bunch of PNGs for all installed fonts. I'm assuming this would be a massive effort. Since it's only mapping the default font names to rendered font previews, it really just pertains text properties or the story editor. So anyway, it would be awesome if there was a way to generate and reuse some prerendered/cached previews of installed fonts. (It's even more of an annoyance for Inkscape, TBH.) 0016838: Cache prerendered fonts for text properties selection dropdownįontconfig/Freetype are pretty slow in generating a list of font previews, which makes initial style selection or live adaptions somewhat tedious.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |