font embedding try
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import lime.tools.Asset;
|
||||
import openfl.text.Font;
|
||||
import feathers.text.TextFormat;
|
||||
import model.Constants;
|
||||
import components.NekoRectangle;
|
||||
import openfl.display.Shape;
|
||||
@@ -10,6 +13,7 @@ import feathers.controls.Panel;
|
||||
import feathers.controls.navigators.StackNavigator;
|
||||
import feathers.controls.Application;
|
||||
import feathers.controls.Label;
|
||||
import model.Constants;
|
||||
|
||||
class LPTCManager2026 extends Application {
|
||||
private var mainPanel:Panel;
|
||||
@@ -38,6 +42,8 @@ class LPTCManager2026 extends Application {
|
||||
|
||||
var title = new Label();
|
||||
title.text = "Header";
|
||||
var fnt:Font = Assets.getFont(Constants.MONTSERRAT_SEMIBOLD_600);
|
||||
title.textFormat = new TextFormat(fnt.fontName, 20, Constants.MAIN_COLOR3);
|
||||
title.variant = Label.VARIANT_HEADING;
|
||||
title.layoutData = AnchorLayoutData.center();
|
||||
header.addChild(title);
|
||||
|
||||
@@ -2,6 +2,7 @@ package model;
|
||||
|
||||
class Constants {
|
||||
|
||||
// Colors
|
||||
public static final HERO_COLOR:Int = 0x050EB7;
|
||||
public static final ACCENT_COLOR1:Int = 0xFF9F1C;
|
||||
public static final ACCENT_COLOR2:Int = 0xFF5F0F ;
|
||||
@@ -9,6 +10,10 @@ class Constants {
|
||||
public static final MAIN_COLOR2:Int = 0x69808A;
|
||||
public static final MAIN_COLOR3:Int = 0xECEFF0;
|
||||
|
||||
// Fonts
|
||||
public static final MONTSERRAT_SEMIBOLD_600:String = "Montserrat_SemiBold_600.ttf";
|
||||
|
||||
|
||||
private function new() {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user