Archived:Display Custom Font in LabVIEW NXG Web Module

Updated Oct 20, 2022

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Environment

Software

  • LabVIEW NXG Web Module

Could you explain to me how to display Code 39 barcodes in LabVIEW NXG Web Module?

To display custom fonts such as Libre Barcode 39 offered by Google Fonts in LabVIEW NXG Web Module, you can include the font support by editing the HTML Source of the webVI. This article will describe in detail what you should do in order to display custom fonts such as Libre Barcode 39 in LabVIEW NXG Web Module's shipping example, Customize With CSS:
  1. Identify the control or indicator you wish to implement the custom font. For demonstration purposes, the following label's font will be changed to Libre Barcode 39. target
  2. Click the Edit HTML Source click
  3. Add the following link tag into row 17 of HTML Source. The link tag helps to link the HTML Source of the webVI to an external style sheet.
    • <link href='https://fonts.googleapis.com/css?family=Libre Barcode 39' rel='stylesheet'> link
  4. Locate the HTML element responsible for the label. Search for the label text with <Ctrl-F> will help you locate its location easily. The location of the label's HTML element is at row 171 and 172. locate
  5. Add a HTML id attribute to the HTML element of the label as illustrated below. In this case, the id of the label is "labelExample". id
  6. By using internal CSS approach, define the font family of HTML element with HTML id attribute of labelExample at row 16 as illustrated below. style
  7. Click OK to save and close the HTML Source. ok
  8. Click Run and now the selected label displays its content in Libre Barcode 39 font. run

This approach is suitable to use for all kind of custom font.