O Pango Markup é uma linguagem de marcação que permite a formação e aplicação de estilos nos textos de aplicativos que são desenvolvidos com toolkit GTK.
Com a linguagem de marcação Pango é possível adicionar aos textos elementos de formatação como negrito, itálico, sublinhado, cores e tamanhos de fonte personalizados.
Posts relacionados:
Atributos
font
Valores:
Sans
.Roboto
.Etc
.
Exemplo:
<span font="Sans">Lorem...</span>
<span font="Roboto">Lorem...</span>
font_desc
Valores:
"Sans Italic"
."Sans Italic 14"
.
Exemplo:
1. <span font_desc="Sans Italic">Lorem...</span>
2. <span font_desc="Sans Italic 14">Lorem...</span>
font_family
Valores:
"Sans Italic"
."Roboto Italic"
.
Exemplo:
1. <span font_family="Sans Italic">Lorem...</span>
2. <span font_family="Roboto Italic">Lorem...</span>
face
Valores:
"Sans Bold 12pt"
."Roboto Bold 12pt"
.
Exemplo:
1. <span face="Sans Bold 12pt">Lorem...</span>
2. <span face="Roboto Bold 12pt">Lorem...</span>
font_size
Valores:
"12"
."14"
.
Exemplo:
1. <span font_size="12">Lorem...</span>
2. <span font_size="14">Lorem...</span>
size
Valores:
"xx-small"
."x-small"
."small"
."medium"
."large"
."x-large"
."xx-large"
."200%"
."14"
."12.5pt"
.
Exemplo:
1. <span size="xx-small">Lorem...</span>
2. <span size="x-small">Lorem...</span>
3. <span size="small">Lorem...</span>
4. <span size="medium">Lorem...</span>
5. <span size="large">Lorem...</span>
6. <span size="x-large">Lorem...</span>
7. <span size="xx-large">Lorem...</span>
8. <span size="200%">Lorem...</span>
9. <span size="14">Lorem...</span>
10. <span size="12.5pt">Lorem...</span>
font_style
Valores:
"normal"
."oblique"
."italic"
.
Exemplo:
1. Lorem <span style="normal">Lorem...</span>
2. Lorem <span style="oblique">Lorem...</span>
3. Lorem <span style="italic">Lorem...</span>
style
Valores:
"normal"
."oblique"
."italic"
.
Exemplo:
1. Lorem <span style="normal">Lorem...</span>
2. Lorem <span style="oblique">Lorem...</span>
3. Lorem <span style="italic">Lorem...</span>
font_weight
Valores:
"ultralight"
."light"
."normal"
."bold"
."ultrabold"
."heavy"
."20"
.
Exemplo:
1. <span font_weight="ultralight">Lorem...</span>
2. <span font_weight="light">Lorem...</span>
3. <span font_weight="normal">Lorem...</span>
4. <span font_weight="bold">Lorem...</span>
5. <span font_weight="ultrabold">Lorem...</span>
6. <span font_weight="heavy">Lorem...</span>
7. <span font_weight="20">Lorem...</span>
weight
Valores:
"ultralight"
."light"
."normal"
."bold"
."ultrabold"
."heavy"
."20"
.
Exemplo:
1. <span weight="ultralight">Lorem...</span>
2. <span weight="light">Lorem...</span>
3. <span weight="normal">Lorem...</span>
4. <span weight="bold">Lorem...</span>
5. <span weight="ultrabold">Lorem...</span>
6. <span weight="heavy">Lorem...</span>
7. <span weight="20">Lorem...</span>
font_variant
Valores:
- “normal”.
- “small-caps”.
- “all-small-caps”.
- “petite-caps”.
- “all-petite-caps”.
- “unicase”.
- “title-caps”.
Exemplo:
1. <span font_variant="normal">Lorem...</span>
2. <span font_variant="small-caps">Lorem...</span>
3. <span font_variant="all-small-caps">Lorem...</span>
4. <span font_variant="petite-caps">Lorem...</span>
5. <span font_variant="all-petite-caps">Lorem...</span>
6. <span font_variant="unicase">Lorem...</span>
7. <span font_variant="title-caps">Lorem...</span>
variant
Valores:
- “normal”.
- “small-caps”.
- “all-small-caps”.
- “petite-caps”.
- “all-petite-caps”.
- “unicase”.
- “title-caps”.
Exemplo:
1. <span variant="normal">Lorem...</span>
2. <span variant="small-caps">Lorem...</span>
3. <span variant="all-small-caps">Lorem...</span>
4. <span variant="petite-caps">Lorem...</span>
5. <span variant="all-petite-caps">Lorem...</span>
6. <span variant="unicase">Lorem...</span>
7. <span variant="title-caps">Lorem...</span>
font_stretch
Valores:
ultracondensed
.extracondensed
.condensed
.semicondensed
.normal
.semiexpanded
.expanded
.extraexpanded
.ultraexpanded
.
Exemplo:
1. <span font_stretch="ultracondensed">Lorem...</span>
2. <span font_stretch="extracondensed">Lorem...</span>
3. <span font_stretch="condensed">Lorem...</span>
4. <span font_stretch="semicondensed">Lorem...</span>
5. <span font_stretch="normal">Lorem...</span>
6. <span font_stretch="semiexpanded">Lorem...</span>
7. <span font_stretch="expanded">Lorem...</span>
8. <span font_stretch="extraexpanded">Lorem...</span>
9. <span font_stretch="ultraexpanded">Lorem...</span>
stretch
Valores:
ultracondensed
.extracondensed
.condensed
.semicondensed
.normal
.semiexpanded
.expanded
.extraexpanded
.ultraexpanded
.
Exemplo:
1. <span stretch="ultracondensed">Lorem...</span>
2. <span stretch="extracondensed">Lorem...</span>
3. <span stretch="condensed">Lorem...</span>
4. <span stretch="semicondensed">Lorem...</span>
5. <span stretch="normal">Lorem...</span>
6. <span stretch="semiexpanded">Lorem...</span>
7. <span stretch="expanded">Lorem...</span>
8. <span stretch="extraexpanded">Lorem...</span>
9. <span stretch="ultraexpanded">Lorem...</span>
font_features
Valores:
dlig=1, -kern, afrc on
.
Exemplo:
1. <span font_features="dlig=1, -kern, afrc on">Lorem...</span>
foreground
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span foreground="#00FF00">Lorem...</span>
2. <span foreground="green">Lorem...</span>
fgcolor
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span fgcolor="#00FF00">Lorem...</span>
2. <span fgcolor="green">Lorem...</span>
color
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span color="#00FF00">Lorem...</span>
2. <span color="green">Lorem...</span>
background
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span background="#00FF00">Lorem...</span>
2. <span background="green">Lorem...</span>
bgcolor
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span bgcolor="#00FF00">Lorem...</span>
2. <span bgcolor="green">Lorem...</span>
alpha
Valores:
"10"
. Valor entre 1 e 65536."50%"
.
Exemplo:
1. <span alpha="10">Lorem...</span>
2. <span alpha="50%">Lorem...</span>
fgalpha
Valores:
"10"
. Valor entre 1 e 65536."50%"
.
Exemplo:
1. <span fgalpha="10">Lorem...</span>
2. <span fgalpha="50%">Lorem...</span>
background_alpha
Valores:
"10"
. Valor entre 1 e 65536."50%"
.
Exemplo:
1. <span background_alpha="10">Lorem...</span>
2. <span background_alpha="50%">Lorem...</span>
bgalpha
Valores:
"10"
. Valor entre 1 e 65536."50%"
.
Exemplo:
1. <span bgalpha="10">Lorem...</span>
2. <span bgalpha="50%">Lorem...</span>
underline
Valores:
"none"
."single"
."double"
."low"
."error"
.
Exemplo:
1. <span underline="none">Lorem...</span>
2. <span underline="single">Lorem...</span>
3. <span underline="double">Lorem...</span>
4. <span underline="low">Lorem...</span>
5. <span underline="error">Lorem...</span>
underline_color
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span underline_color="#00FF00">Lorem...</span>
2. <span underline_color="green">Lorem...</span>
overline
Valores:
"none"
."single"
.
Exemplo:
1. <span overline="none">Lorem...</span>
2. <span overline="single">Lorem...</span>
overline_color
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span overline_color="#00FF00">Lorem...</span>
2. <span overline_color="green">Lorem...</span>
rise
Valores:
"6pt"
."12pt"
.
Exemplo:
1. <span rise="6pt">Lorem...</span>
2. <span rise="12pt">Lorem...</span>
baseline_shift
Valores:
"6pt"
."12pt"
.
Exemplo:
1. <span baseline_shift="6pt">Lorem...</span>
2. <span baseline_shift="12pt">Lorem...</span>
font_scale
Valores:
"superscript"
."subscript"
."small-caps"
.
Exemplo:
1. <span font_scale="superscript">Lorem...</span>
2. <span font_scale="subscript">Lorem...</span>
3. <span font_scale="small-caps">Lorem...</span>
strikethrough
Valores:
"true"
."false"
.
Exemplo:
1. <span strikethrough="true">Lorem...</span>
2. <span strikethrough="false">Lorem...</span>
strikethrough_color
Valores:
"#00FF00"
."green"
.
Exemplo:
1. <span strikethrough_color="#00FF00">Lorem...</span>
2. <span strikethrough_color="green">Lorem...</span>
fallback
Valores:
"true"
."false"
.
Exemplo:
1. <span fallback="true">Lorem...</span>
2. <span fallback="false">Lorem...</span>
lang
Valores:
"en_US"
."pt_BR"
.
Exemplo:
1. <span lang="en_US">Lorem...</span>
2. <span lang="pt_BR">Lorem...</span>
letter_spacing
Valores:
"5"
."10"
.
Exemplo:
1. <span letter_spacing="5">Lorem...</span>
2. <span letter_spacing="10">Lorem...</span>
gravity
Valores:
south
.east
.north
.west
.
Exemplo:
1. <span gravity="south">Lorem...</span>
2. <span gravity="east">Lorem...</span>
3. <span gravity="north">Lorem...</span>
4. <span gravity="west">Lorem...</span>
gravity_hint
Valores:
natural
.strong
.line
.
Exemplo:
1. <span gravity_hint="natural">Lorem...</span>
2. <span gravity_hint="strong">Lorem...</span>
3. <span gravity_hint="line">Lorem...</span>
show
Valores:
none
.spaces
.line-breaks
.ignorables
.
Exemplo:
1. <span show="none">Lorem...</span>
2. <span show="spaces">Lorem...</span>
3. <span show="line-breaks">Lorem...</span>
4. <span show="ignorables">Lorem...</span>
insert_hyphens
Valores:
true
.false
.
Exemplo:
1. <span insert_hyphens="true">Lorem...</span>
2. <span insert_hyphens="false">Lorem...</span>
allow_breaks:
Valores:
true
.false
.
Exemplo:
1. <span allow_breaks="true">Lorem...</span>
2. <span allow_breaks="false">Lorem...</span>
line_height:
Valores:
1
.10
.
Exemplo:
1. <span line_height="1">Lorem...</span>
2. <span line_height="10">Lorem...</span>
text_transform
Valores:
none
.lowercase
.uppercase
.capitalize
.
Exemplo:
1. <span text_transform="none">Lorem...</span>
2. <span text_transform="lowercase">Lorem...</span>
3. <span text_transform="uppercase">Lorem...</span>
4. <span text_transform="capitalize">Lorem...</span>
segment
Valores:
sentence
.word
.
Exemplo:
1. Lorem <span segment="sentence">Lorem...</span>
2. Lorem <span segment="word">Lorem...</span>
Tags de conveniência
O Pango também fornece algumas tags que facilitam a aplicação de alguns estilos as fontes:
<b>
: Negrito.<big>
: Torna a fonte grande, equivalente aosize=larger
.<i>
: Itálico.<s>
: Riscado (tachado).<sub>
: subscrito.<sup>
: Sobrescrito.<small>
: Torna a fonte pequena, equivalente aosize=smaller
.<tt>
: Monospace.<u>
: Sublinhar.
Exemplo:
1. <b>Lorem...</b>
2. <big>Lorem...</big>
3. <i>Lorem...</i>
4. <s>Lorem...</s>
5. <sub>Lorem...</sub>
6. <sup>Lorem...</sup>
7. <small>Lorem...</small>
8. <tt>Lorem...</tt>
9. <u>Lorem...</u>