EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 01-01-2011, 08:04 PM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default Why will my font not load?

I'm working on a ui replacement for mainhud_player, inlcuded below. It uses a custom textstyle, included below. The textstyle uses a custom font, included below.

The problem is, i cannot get the custom font type to load into the ui. It patently refuses to obey the textsyle and it's pissing me off. Does anyone have an idea why it will not work, based on the code? If you look at the code, the Emblem font should be used to display the HP%, but it loads the default font type instead, but adjusts to my specified font size.

However, in UIBuilder, it loads fine. I've also tried using one of the default styles, CombatBubbleCrit, but again it loads the default font type.

Please please help. I want this to work.

Regads.
Attached Files
File Type: xml eq2ui_mainhud_player.xml (6.0 KB, 502 views)
File Type: xml eq2ui_textstyles.xml (16.4 KB, 417 views)
File Type: zip emblem.zip (21.7 KB, 371 views)
Reply With Quote
  #2  
Unread 01-02-2011, 01:39 PM
TW Shrub TW Shrub is offline
A Brown Bear
Interface Author - Click to view interfaces
 
Join Date: Oct 2004
Server: Nektulos
Posts: 8
Default

One thing I see in the eq2ui_textstyles.xml file is that in the TextStyle definition for "56" (about line 110); the FontName is set to Arial rather than Emblem.

It has been my experience that while in-game it will use the FontName property to determine which font to use regardless of what the PrivateFontPath property actually points to. In contrast, the UIBuilder will (seemingly) always use the PrivateFontPath regardless of what the FontName says (just the oppposite of the in-game behavior).

It worked fine for me when I just changed the FontName property to "Emblem":

<TextStyle Algorithm="Simple" FontName="Emblem" Language="english" Leading="-2" Name="56" PointSize="56" PrivateFontPath="UI/Fonts/Emblem.ttf" UseCachedFont="true"/>

rather than:
<TextStyle Algorithm="Simple" FontName="Arial" Language="english" Leading="-2" Name="56" PointSize="56" PrivateFontPath="UI/Fonts/Emblem.ttf" UseCachedFont="true"/>

This may only be true when UseCachedFont is set to true but that is how I have always done fonts so this behavior may not hold true when not using cached fonts.

Last edited by TW Shrub : 01-02-2011 at 01:51 PM. Reason: After-thought
Reply With Quote
  #3  
Unread 01-02-2011, 04:32 PM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default

Oh man. I was certain i had made that change without any effect, but i realize now, that it might have been another thing interferring. It seems that selecting Small Sans Serif Font, in the UI Options panel, overwrites just about every font change i specified. And removing it, changed all of the fonts, that i didn't specify, to that old ugly one. Have to go back and manually set font styles i throughout. But thanks man, that did load the Emblem properly.

.Regards
Reply With Quote
  #4  
Unread 01-02-2011, 05:42 PM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default Font spacing

I redid the window, using specific fonts. I decided to use a font i used in WoW, Roth, which is nice clean and legible.
For some reason, however, EQ does something horrid with the spacing. For instance, 11, sits on top of each other. Which is something that i know didn't occur in WoW. I even have screenshots of my ui using Roth, to compare.

So i'm wondering if there are any settings i can adjust in the textstyles sheet that will makeup for this behaviour.

Here's the font, and screenies.

.Regards
Attached Thumbnails
Click image for larger version

Name:	WoW.jpg
Views:	447
Size:	321.4 KB
ID:	7646  Click image for larger version

Name:	EQ.jpg
Views:	431
Size:	215.4 KB
ID:	7647  
Attached Files
File Type: zip roth.zip (53.3 KB, 365 views)
Reply With Quote
  #5  
Unread 01-03-2011, 10:10 AM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default Colors

So i'm almost done with my Player/Target mod. The last problem had to do with the HP%, and the fact that i hate having that % sign there for no particular reason. I got around it, by using an invisible text box for the dynamic data, and truncating the HP%. Then i tried grabbing the color from the dynamicdata to adjust the output data to match. It works fairly well, but there's a delay in the color change. The output box, is one cycle behind the dynamicdata, meaning it will not change colors for a full tick.

Here's the code snippet:
Code:
	<Page OnPress="target_self target_self" Location="150,0" Name="HPPrcnt" Size="101,65" >
		<Text AbsorbsInput="false" DynamicData="/GameData.Self.Health" DynamicDataFilter="FFFB" Font="/_Styles.Fonts.Large" LocalText="85%" Location="2,0" MaxLines="1" Name="Axp" ScrollExtent="130,80" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Size="150,80" Color="#00FF40" TooltipStyle="/TooltipStyles.tooltip_default" TextAlignment="left" TruncateElipsis="false" ontextchanged="
		parent.HPp.text = int(localtext)
		"/>
		<Text AbsorbsInput="false" Font="/_Styles.Fonts.EpicLarge" LocalText="85%" Location="2,0" MaxLines="1" Name="HPp" ScrollExtent="130,80" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Size="150,80" Color="#00FF40" TooltipStyle="/TooltipStyles.tooltip_default" TextAlignment="left" TruncateElipsis="false" ontextchanged="
		color = parent.Axp.color
		"/>
	</Page>
Anyone have an idea of how to make the color match the dynamicdata, cycle for cycle?

.Regards
Reply With Quote
  #6  
Unread 01-03-2011, 08:11 PM
TW Shrub TW Shrub is offline
A Brown Bear
Interface Author - Click to view interfaces
 
Join Date: Oct 2004
Server: Nektulos
Posts: 8
Default

What I would do is add the DynamicData (/GameData.Self.Health) to the "HPp" text object itself and then add a DynamicDataFilter to filter out everything except the color data.
If I remember correctly, the DynamicDataFilter for the color is "0400" but I don't have the documentation in front of me so that may be incorrect.

That way the text should change color as soon as the DynamicData changes and you can eliminate one UI object query (which may be the cause of the delay you're seeing).
Reply With Quote
  #7  
Unread 01-03-2011, 08:41 PM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default

Wooo. Thanks a ton. With that it worked perfectly, and i now understand DynamicDataFilters. Beautiful.

.Regards
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:19 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI