Reputation: 675
I have an application that is written in the apex oracle environment, but I want to change the font in this application (for example on "Calibri". I downlad this font:
But I can't find how to do it. I also tried to Theme Roller the css in the topic with the help of this code, but it did not help.
I will be grateful for the help.
Upvotes: 1
Views: 8126
Reputation: 1750
Yes you can add your custom font to Oracle APEX by following the next steps (tried with .otf
file not .ttf
):
Add the .otf
file to your application Static Application Files (for example: your-custom-font.otf
)
Add an Application item called FONT
Create an Application process:
On Load: Before Header (page template header)
begin
:FONT := '<style type="text/css">
@font-face {
font-family: "DefaultFont";
src: url(#APP_IMAGES#your-custom-font.otf);
}
body {
font-family: "DefaultFont" !important;
}
.ui-widget {
font-family: "DefaultFont" !important;
}
</style> ';
end;
&FONT
.The described process is very helpful if you need different fonts for different users, but if all your users have the same font. Then you just need following Inline CSS to the page:
@font-face {
font-family: "DefaultFont";
src: url(#APP_IMAGES#your-custom-font.otf);
}
body {
font-family: "DefaultFont" !important;
}
.ui-widget {
font-family: "DefaultFont" !important;
}
Or for Calibri add this CSS:
body {
font-family: Calibri, sans-serif !important;
}
Also when choosing font consider this.
Upvotes: 2