Spanish B4X - Uso de custom fonts icons (SliderMenu) - TILogistic    Jun 30, 2021   (27 reactions) AddItem(7,"Setting", FontToBitmap(Chr(0xe90a), IconsFont, 26, xui.Color_Black))
Fonts a bitmap
'Convert fonts a icon bitmap
Public Sub FontToBitmap (FontText As String, FontType As B4XFont , FontSize As Int, FontColor As Int) As B4XBitmap
Dim xui As XUI
Dim p As B4XView = xui.CreatePan B4A Code Snippet [B4X] Using custom fonts on labels and canvases - TILogistic    Sep 15, 2024   (12 reactions) Using custom fonts on labels and canvases.
Demo code attached.
156972 B4J Library [B4X] [XUI] xChart Class and b4xlib - klaus    Jul 10, 2024   (103 reactions) Value = Y scale value.
RemovePointData (Index As Int) As String
removes the data of the point with the given index
SetBarMeanValueFormat (MinimumIntegers As Int, MaximumFractions As Int, MinimumFractions As Int, GroupingUsed As Boolean)
sets a custom numberformat for the bar mean line value, values B4J Question Custom Font in Designer - Erel (first post)    Jan 04, 2022   (2 reactions) B4XView:
tf.Font = xui.CreateFont(fx.LoadFont(...), 14)
Only B4A supports adding fonts inside the designer. B4A Library [B4X] SD CustomKeyboard - Star-Dust    Mar 26, 2024   (42 reactions) THIS version is no longer updated and supported. You can continue to use it if you want.
Or try the new version with rewritten methods and new features
IMPORTANT
depends on SD CreativeBackGround (0.06+) library which must be downloaded
MaterialIcon font for special characters must be loaded.
Use: B4A Library [B4X] BCTextEngine / BBCodeView - Text engine + BBCode parser + Rich Text View - Erel (first post)    Dec 31, 2019   (4 reactions) V1.71 adds support for custom fonts.
Example:
TextEngine.CustomFonts.Put("italic",xui.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 10)) 'size not important
BBCodeView1.Text = $"Example of using custom font. We can also change its size."$
Cross platform italic font:
Su B4J Question [SOLVED] B4XFloatTextField How to Set Custom Font - Erel (first post)    Jul 20, 2022   (2 reactions) 131658
It doesn't matter whether a view is declared as B4XView or not. It doesn't affect the behavior.
The case here is a bit more complicated as TextField doesn't have a font property and it must be set with a CSS attribute. Apparently referencing external fonts must be done with a CSS file:
@f B4A Question Custom font on designer - Erel (first post)    Oct 25, 2017   (3 reactions) Add the font to the layout files and set it in the Typeface property:
https://www.b4x.com/basic4android/images/SS-2017-10-25_18.53.36.png B4A Tutorial Setting custom font for whole application without any library - Brandsum    Dec 02, 2018   (13 reactions) Then add this following code to apply custom font
CreateResource(values, theme.xml,
<resources>
<style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:fontFamily">@font/CustomFontStyle</item>
<item name="fontFamily">@font/CustomFontStyle</item>
B4i Question App with custom font - can a webview use it? - Erel (first post)    Feb 08, 2023   (1 reaction) 139055
Dim FontFile As String = "vermidirouge 1.0.ttf"
Dim s As String = $"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0" />
<style>
@font-face
{
Font-family: 'VermidiRouge';
src: local('VermidiRouge'),url('${FontFile}') format('opentype');
}
</style>
</he Page: 1   2   3   4   5   6   7   Powered by ColBERT |