PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Default font
  • Finding out the list of fonts installed on a computer
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Creates a new print font from the standard window for font selection:
This font can be used in the different processes. This font is referenced by a font number, chosen during the development. To choose this font and to use it in the different print functions, all you have to do is select it with iFont.
Note: This function MUST NECESSARILY be called AFTER iPreview. Otherwise, the previews will be ignored.
Example
FontNum is int
FontNum = iSelectFont(1, True, "Arial", 8, iBold + iUnderlined, LightRed)
IF FontNum = 0 THEN
ProcessError()
END
Syntax
<Result> = iSelectFont(<Font Number> [, <Advanced Options> [, <Preselected Font> [, <Preselected Height>]]] , <Style> [, <Color>])
<Result>: Integer
  • Identifier of the selected font,
  • 0 if a failure occurred (selection canceled for example).
<Font Number>: Integer
Font Identifier. This identifier will be used by iFont to select a font.
<Advanced Options>: Optional boolean
  • True (default option): enables the display for the underlined attribute and for the choice of colors.
  • False: ignores the advanced options.
<Preselected Font>: Optional character string
Name of the font selected by default in the window for font selection. No font is pre-selected if this parameter is not specified.
<Preselected Height>: Optional integer
Height of the font selected by default in the window for font selection. No height is selected by default if this parameter is not specified.
<Style>: Integer constant (or combination of constants)
Attributes of the font:
iStrikeOutStrikeout font
iCondensedCondensed characters
iExtendedExtended characters
iBoldBold font
iItalicItalic font
iLargeLarge characters
iNormal
(default value)
Standard font, without attributes
iUnderlinedUnderlined font
<Color>: Optional integer
Color used for the font. If this parameter is not specified, the color used is black.
This color corresponds to:
Remarks

Default font

The default font has the following characteristics:
  • Font #0,
  • Size: 12,
  • Normal style.

Finding out the list of fonts installed on a computer

To find out the list of fonts installed on a computer:
  1. In the program manager of Windows, choose the main group.
  2. Click the "Control panel" icon and select "Fonts".
  3. In the list of fonts installed, write down the names without taking the attributes and the types into account.
Notes:
  • FontList returns the list of fonts installed on a computer.
  • iSelectFont is used to create a print font from the standard window for font selection of Windows.

Various

  • iCreateFont can also be used to create fonts.
  • You must create as many fonts as the number of colors found in the text.
Components
WINDEVReports and Queries wd230prn.dll
Linux wd230prn.so
Minimum required version
  • Version 9
This page is also available for…
Comments
exemplo iSelectFont
// exemplo iSelectFont

nFonte_Numero is int=iSelectFont(1,True,"Arial",8,iBold,LightGray)
iDestination(iPDF)
Marca_Dagua()
iPrint(iFont(1) + "")
iPrint("")
iPrint("Relatorio de Bancos")
iHLine(0, iPageWidth())
iPrint("")
iPrint(iXPos(1) + "Codigo" + iXPos(18) +"Nome")
iHLine(0, 30)
iPrint("")
FOR EACH bancos
iPrint(iXPos(1)+ NumToString(bancos.id_bancos,"06d") + iXPos(18) + bancos.nome)
END
iHLine(0, iPageWidth(), 2.5)
iPrint("")
iPrint("Tipos Linhas - iDotted")
iHLine(0, 30,iDotted)
iPrint("")
iPrint("iDotAndDash")
iHLine(0, 40,iDotAndDash)
iPrint("")
iPrint("iDashed")
iHLine(0, 50,iDashed)
iEndPrinting()
ShellExecute(iLastFile())

INTERNAL PROCEDURE Marca_Dagua()
Marca_Dagua is Watermark
Marca_Dagua..Text = "Homologação"
Marca_Dagua..Font..Name = "Arial"
Marca_Dagua..Position = iCenterH + iBottom
Marca_Dagua..Opacity=50
iParameterWatermark(iWatermarkPrinting + iWatermarkDuplicate, Marca_Dagua)
END

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-978-windev-relatorio-37-iselectfont.html

https://www.youtube.com/watch?v=7GYnraTyzCw

De matos
Dec. 04 2016