Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AlexOmetis
Partner Ambassador
Partner Ambassador

Changing font depending on selection

We are working on some QlikView applications that have multi-language source data. We have hit an issue where Vietnamese characters do not display correctly when using standard fonts (showing 2 characters where there should be 1 accented character). We have found that changing the font to a special Vietnamese font means that the characters display as expected.

However the Vietnamese font is not as clear and doesn't work quite as well across the application, so we are wanting to make it display only when Vietnamese data is being displayed. I'm not expecting to be able to change this line by line in a list box or chart - I appreciate this would be more complex or impossible. I just want it so that when a Vietnamese organisation is included, the font changes on some/all of the objects in the app.

Ideally we could do this via an expression in the font settings, but this is not possible - you can only control font colour & style (bold / underline / italic).

We have come up with a couple of options - create a separate user interface using the same data model but set to use the Vietnamese font or create a clone of each affected object and then conditionally show based on selections. Neither of these is ideal as it introduces a maintenance issue in the application as you have to perform any changes in 2 locations.

I was wondering if anyone has any other ideas about how to control this. Perhaps via a macro that runs when you select a country / organisation? Perhaps a macro that runs on open and looks at the user details to see if they want to use Vietnamese fonts? Perhaps a clever use of themes?

Ideas welcomed!

Qlik Partner Ambassador 2024
3 Replies
Not applicable

Alex,

Did you check with demo application in qlikview community.. There they provided similar solution..

Here I added "Whats New in QV 11" file. Start with first sheet. There you may found good solution for you.

AlexOmetis
Partner Ambassador
Partner Ambassador
Author

Thanks,

That changes the language, but not the font - it stays as Arial as far as I can see. We have ways of working with multi-language using expressions & so on, but not found a way to alter fonts...

Qlik Partner Ambassador 2024
marcus_sommer

Per macro should it be possible to change the font, perhaps depending from osuser(). Look in APIGuide.qvw (search font in field Member) for examples like this:

rem set active sheet to Arial 14 bold

set sp = ActiveDocument.ActiveSheet.GetProperties

set sfont = sp.SheetFont

sfont.FontName = "Arial"

sfont.Bold = true

sfont.Italic = false

sfont.Underline = false

sfont.PointSize1000 = 14000

ActiveDocument.ActiveSheet.SetFont sfont

- Marcus