114 views
in Embedded Wizard Studio by

      On my project, one list that have a special Chinese font(like this: 7,6,5,4,3,2,1,关),it's show completely at EW simulation environment,but when we build EW project and download to the screen board,it can't show normal。

      on the list we have 3 list members,the left and right list can show complete  at screen board,but the middle list can't show normally。

      normally show like the below picture

          

      but at the screen board,  the middle highlight list can not show the string “关”, middle highlight list show other string normally。

      Same time the left and right list can show all string normal on the screen board.

      Can you give me some idea to resolve this bug

 

1 Answer

0 votes
by
Hello,

please check the console output on the target (via serial interface) - there should be some error message that helps to find the root cause.

Please let me know the entire message that you receive. Furthermore, please let us know more details about the target and the Embedded Wizard / Build Environment version that you are using.

Best regards,

Manfred.
by
my EW version is 11.00,and use the VGlite mini apps

the entire message is : 7, 6, 5, 4, 3, 2, 1, 关

I try to change the sequence of list string (like: 7,6,5,4,3,2,关,1), the left and right list can show the string "光"; normally.

the middle high light list can show string “1”normally,but not show the string "关";
by
There must be some message printed via the serial interface. Please let me know if there is any error message.
by
At the EW simulation environment, the function is normal and log window have not any log

but at the Screen board,the middle can not show the string "关"

i have change some way to test this function:

first change this 3 list to 1list that can show 3 list item

S1: 3 list item use the same font (HYQiHei_45S_64) and same color, at the screen it's show mormal.

S2: 3 list item use the same font (HYQiHei_45S_64) But middle use High light color, at the screen it's show mormal.

S3: 3 list item use the diffenert font (Left/Right use HYQiHei_45S_64, Middle use HYQiHei_45S_72) and middle use High light color, the middle item can't show "关",can show string "1、2、3、4、5、6、7" normal, the Left/Right item can show all string normal.
by
I think it's maybe HYQiHei_45S_72 font problem,do you have same idea to make sure the problem?

And why  HYQiHei_45S_64 font can show string "关" normal, but  HYQiHei_45S_64 font can't show string "关" ?
by
Code like this:

var int32       itemNo   = HorizontalList.Item;
var Views::Text itemView = (Views::Text)HorizontalList.View;

// The implementation of this slot method does not match the item class
// specified in the associated list component. Or the slot method is not
// called in context of the OnLoadItem list operation.
if ( itemView == null )
  return;         

// Configure the item view ...
if ((itemNo >= 0) && (itemNo < Device::Device.WindLevelString.size)) {
  itemView.String = Device::Device.WindLevelString[itemNo];
}

// Calculate the center position of the just loaded item relative to the
// center of list itself.
var int32 x = ( HorizontalList.ItemWidth * itemNo ) + HorizontalList.ScrollOffset +
              ( HorizontalList.ItemWidth / 2 ) - HorizontalList.Bounds.w / 2 + HorizontalList.PaddingLeft;

// Is it the item oin the center area?
if ( x.abs < ( HorizontalList.ItemWidth / 2 ))
{
//  itemView.Font  = Res::HYQiHei_45S_72;
  itemView.Font   = Res::HYQiHei_45S_64;
  itemView.Color = #FFFFFFFF;

  itemView.Bounds.y1 = 0;
} else   
{
  itemView.Font   = Res::HYQiHei_45S_64;
  itemView.Color = #808080FF;

  itemView.Bounds.y1 = 5;
}

// Ensure that the item has correct size. The position of the item will be
// managed by the list component.

itemView.Bounds.size = point( 104, 100 );

InvalidateViewState();
by

because the HYQiHei_45S_64 and HYQiHei_45S_72 are not the default font on EW,so i add the font to my project,the string.excel like this

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=6700696598101424927

by
for this information, do you have some idle to result this problem?
by

I have do the test like below:

there have 6 text that show the same string "星期日",the font is HYQiHei_45S_28、HYQiHei_45S_36、HYQiHei_45S_48、HYQiHei_45S_64、HYQiHei_45S_72、HYQiHei_45S_100, that have the same font but different font height.

when download to the Screen Board, the HYQiHei_45S_72、HYQiHei_45S_100 can't show, the other show normal (HYQiHei_45S_28、HYQiHei_45S_36、HYQiHei_45S_48、HYQiHei_45S_64)

 

by
For these test, i think that is a font height problem, what cause this problem?
by

Hello,

as mentioned in my first comment, please check the console output on the target (via serial interface) - there should be some error message that helps to find the root cause.

I assume that there is not enough memory or the glyph cache is configured to small to show these large characters. See EW_MAX_GLYPH_SURFACE_WIDTH and EW_MAX_GLYPH_SURFACE_HEIGHT.

If the problem still exists, please let me know the entire message that you receive. Furthermore, please let us know more details about the target and the Embedded Wizard / Build Environment version that you are using.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...