Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
webriva template question
#1
Hi All,
I am trying to reproduce an android app as a webriva template interface.
Obviously this will not be a commercial offering Rolleyes
I am running into some difficulties using the fonts that are used in the app.
The app uses the standard android Roboto Thin fonts, which are available.
I installed this font on my development machine, and selected it in the template, but when opened in a browser, it is getting substituted, even on Android where the font is clearly available.
What are the tricks to force the use a specific font?
Thanks
Reply
#2
That would be a web browser thing I would imagine. You may have to do something in that particular browser to make the fonts available there, even if they are available for general application use already. That application may be specifically loading it, for instance, because it's not a standard font. There may be a browser option to do that for the browser itself, I dunno.
Dean Roddey
Software Geek Extraordinaire
Reply
#3
thanks Dean, so enabling FF to load remote fonts helped, both in the settings as well as in adblock I use...
Now the font I would like to use, looks more less how it should.
Few more questions:

- How to select a specific font type from a family in the interface designer? For example if the family includes thin, regular, bold, cursive bold, what not... it seems that the first is picked. So I installed the Roboto font family on a Windows computer which I now use as testing, and the thin type was the 4th in the font family. The correct one did not show in Webriva until I deleted the other ones that were before the type I wanted to display.

- Any pointers how to debug the websocket in a browser? When I try to use the inspector in FF, all I get are few lines and an error message that your browser does not support HTML5 canvas

thanks
Reply
#4
I'm not sure about the font thing. If it's listed, it should be selectable. There are lots of fonts in the bunch that ship with Windows which come in various flavors and I seem to be able to select any of them. Make sure the Bold and Italic settings are off in the attributes for that widget, or those will get applied to whatever you choose, artificially in that case.

What sort of issue are you having with the websocket? If your browser doesn't support the canvas element, nothing is going to work. WebRIVA is a graphical application. It only creates one HTML object mostly, which is a canvas that it draws into. Is your browser supposed to have canvas support?
Dean Roddey
Software Geek Extraordinaire
Reply
#5
Photo 
Let's table the canvas error for the time being, the webriva still works, so will look at that later.
For now I try to sort out the font issue.
My CQC single-server master is on a Windows Server 2008 R2, with an installed desktop environment.
When I go to select a font in the interface designer I get a list of fonts but every font is identified by a family name. For example Tahoma is listed once. If I go to control panel/fonts/ I see Tahoma there, and when click it, it opens into to show that I have Tahoma Bold and Tahoma Regular, in that order.
When I put a text field on a template, and select the only Tahoma font, I get what looks like the Tahoma Bold. The "Bold" is False in the template designer.
Is this how it suppose to be?
See attached pic


Attached Files
.jpg   Clipboard-2.jpg (Size: 77.6 KB / Downloads: 3)
Reply
#6
The IV only selects TrueType fonts, so that it can cleanly scale them. So that might explain why some are not there. It may be that the base font is a TT font, and the others are non-TT fonts that already have an effect applied to them, something like that. So you get the TT font, and would have to dynamically apply bold/italic to it. The IV doesn't expose weight, assuming that typically you would have separate named fonts for different weights, or would just use the bold attribute for the most common weight change.

I also see a single Tahoma. For some others, like Segoe, Yu Gothic, and some of the Microsoft fonts, I see lots of named variations.

If you go to the fonts folder in Explorer, and show the fonts with large icons, do you see those Tahoma variations with a TT icon?
Dean Roddey
Software Geek Extraordinaire
Reply
#7
Hmmm... The Windows 10 font folder doesn't show the icon anymore that indicates if its TT or not. It shows a sample of the font. But, if you go to the Details view, and then select the View item in the menu bar and then Choose Details, you can enable font type as one of the displayed columns in detail view.

Basically if it shows OpenType or TrueType, then the IV should load that one. If it shows Raster, or some other non-vector font type it won't. In the Font Style column it'll show the styles supported (Bold, Italic, etc...) inside that font file. It still only shows up as a single font in the case of Tahoma, but there are bold and regular versions. So presumably that means if you select the Bold option in the attribute editor, it has a predefined bold version of that font, so it doesn't have to create a pseudo bold on the fly.
Dean Roddey
Software Geek Extraordinaire
Reply
#8
Thanks
so there is no specific way in the interface designer to load a specific type of font, like I show in the screenshot, can only choose Tahoma, but cannot decide if the Bold or Regular be selected. After making backups, if I delete the Tahoma Bold in the control panel, then the regular will be loaded as that will be the first.
Reply
#9
Just select the Bold attribute. If there's a bold version of it in the font, that will be used. If you look in the Windows font list, there is only a Tahoma font listed. There are no variations listed. But, internally, there are regular and bold versions. You CAN create specific named variations of fonts, but for the standard variations, like Bold, they can just include it in the font and when you select the Bold attribute, Windows will use the Bold version of it.

I don't know if that other one is like that. It may be, we'll have to look at it in the font list and see how its presented. If so, the only way to select the weight based ones (other than regular/bold) would be to support a more general 'weight' attribute, which is supported at the Windows level, and there are specific weights for Bold, Normal, Light, Semi-bold and all that. Presumably that would make those variations be selected, even though only the one name shows up to select from.
Dean Roddey
Software Geek Extraordinaire
Reply
#10
(12-21-2017, 06:39 PM)Dean Roddey Wrote: Just select the Bold attribute. If there's a bold version of it in the font, that will be used. If you look in the Windows font list, there is only  a Tahoma font listed. There are no variations listed. But, internally, there are regular and bold versions. You CAN create specific named variations of fonts, but for the standard variations, like Bold, they can just include it in the font and when you select the Bold attribute, Windows will use the Bold version of it.

I don't know if that other one is like that. It may be, we'll have to look at it in the font list and see how its presented. If so, the only way to select the weight based ones (other than regular/bold) would be to support a more general 'weight' attribute, which is supported at the Windows level, and there are specific weights for Bold, Normal, Light, Semi-bold and all that. Presumably that would make those variations be selected, even though only the one name shows up to select from.

OK, I think you explained it. Given the font I am after has a weight "Thin" however this may not be standard for Windows and hence is chosen when is the only one installed.
What I am trying to do is to have a large font, such as 125 point on a 1920 tall display, and most standard fonts become too thick, this one is thin and is not overpowering even at that size.
Thanks Dean!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  WebRiva iPhone X monetteboy 7 45 11 hours ago
Last Post: Dean Roddey
  WebRIVA, domains, Security Certs IVB 38 388 01-13-2018, 04:03 PM
Last Post: jkmonroe
  WebRIVA - Raspberry PI - View Only batwater 2 1,265 09-17-2017, 06:41 PM
Last Post: znelbok
  Template errors after upgrade to 4.8.3 avtexan 4 830 08-13-2016, 11:29 PM
Last Post: avtexan
  Tivo control question MikeA 21 4,005 12-26-2015, 06:29 PM
Last Post: dogman
  Question on Hue and Lux driver Deane Johnson 5 996 05-21-2015, 01:39 PM
Last Post: Deane Johnson
  Template Editor Annonyances rsw686 13 1,878 05-17-2015, 05:55 PM
Last Post: Dean Roddey
  CQC web Server Question SomeWhatLost 14 2,584 05-13-2015, 07:45 PM
Last Post: Dean Roddey
  IR code / Global Cache question ControlFreak 11 3,323 11-09-2014, 09:27 PM
Last Post: MikeA
  Off topic security question rtarver 2 1,008 10-13-2014, 07:49 PM
Last Post: rtarver

Forum Jump:


Users browsing this thread: 1 Guest(s)