Version 5 (modified by 19 months ago) ( diff ) | ,
---|
Table of Contents
- 825 Programmer's Manual
- Application Libraries
- Database Libraries
- Standard 825 Library with Application class (lib825)
- Standard 825 Library with EVENT features (lib825ev)
- Communications Functions
- CComm
- CCommClient
- CCommSerial
- CCommServer
- Analog Output (DAC Digital to Analog Conversion) Functions
- GetDAC
- GetDACPercent
- GetDACRangeFromIndex
- GetIndexFromDACRange
- SetDACFloat
- SetDACOutputRange
- SetDACPercent
- SetDACReg
- SetDACTrackGrossNet
- SetDACTrackScale
- StopDACTrackScale
- Debug Functions
- DEBUG_MSG
- DEBUG_SHOWDATA
- Display Functions
- CBitmap
- CFont 825gen2
- CImage 825gen2
- ClearLCD
- DisplayStr DEPRECATED - Replace with DisplayText
- DisplayText
- GetX
- GetY
- InitLCD
- IsFontLoaded
- LocateLCD
- PrintLCD
- PrintLCDbutton
- PrintLCDfont2
- ReadFont
- SetBkColor
- SetCurColor
- File Functions
- CFile
- FileCopy
- FindChromiumPath 825gen2
- FindFlashDrive 825gen2
- GetFilesInPathWithExtension
- IsMounted
- MakeDirIfNotExists
- MountDirectory 825gen2
- UnmountDirectory 825gen2
- Form Functions
- CForm
- CFormRect 825gen2
- EVENT
- EVENT_FLAG_SHOW
- EVENT_SHOW_BTN_CONTENT
- EnableItem
- ExitWithCode
- FORM_ADD_BUTTON
- FORM_ADD_BUTTON2 825gen2
- FORM_ADD_INPUT
- FORM_ADD_INPUT2 825gen2
- FORM_DONE_ESCAPE
- FORM_DONE_EVENT_EXTERNAL
- FORM_DONE_LEFT_ARROW
- FORM_HIDE
- FORM_INIT
- FORM_IS_UPDATED
- FORM_RUN
- FORM_SHOW
- FindName
- GetCurrentItemIndex
- GetExitCode
- GetItem
- !GetItemByIDVal
- GetItemCount
- GetItemIndex
- HideItem
- IN_EVENT_HIDE_FORM
- IN_EVENT_SHOW_FORM
- IN_EVENT_WRITE_DATA
- IsChanged
- SetInputFont
- SetKeyEvent
- ShowItem
- WriteData
- Input / Output (Digital I/O) Functions
- GetInput
- GetInputMask
- GetOutput
- SetDIOCounter
- SetOutput
- SetOutputMask
- StartDIOPulse
- StartRepeatIO Deprecated
- StopDIOPulse
- StopRepeatIO Deprecated
- Keypad/Sound Functions
- ClearKeyBuffer
- KeyPadInsertKey
- KeyPadSetUSBEvent
- OpenBeeper
- PlayNotes
- WaitKeypress
- Process Functions
- GetProcessID
- GetProcessIDExcludeSelf
- KillProcess
- ResetPrevGrossWt
- ResetPrevNetWt
- ResetPrevTareWt
- test
- String Functions
- FloatToStr
- IntToStr
- StrFmt
- StrFmtLen
- StrToFloat
- StrToInt
- StrTrimLeft
- StrTrimRight
- Ticket Functions
- CTktFlds
- PrintTkt
- Time and Date Functions
- CMillisecondTimer
- CSleep
- CTimer
- DoSleep
- GetDateStr
- GetLinuxTime
- GetTimeStr
- IsTimeChanged
- ResetPrevTime
- SleepMilliseconds
- SleepSeconds
- Utility Functions
- GetKernelVer
- GetKernelVerStr
- GetLoaderVer
- GetLoaderVerStr
- GetMemFree
- GetMnBdVer
- GetMnBdVerStr
- Weighing Functions
- CheckWIM * DEPRECATED - New apps should use MnBdSetWIM *
- DLCRepeatMultiIncludeCellWts
- FormatGrossWt
- FormatNetWt
- FormatTareWt
- FormatWt
- GetBelowZero
- GetCapacity
- GetCenterZero
- GetCurUnitsLabel
- GetDecimal
- GetGrossWt
- GetInterval
- GetMotion
- GetNetWt
- GetNumScales
- GetOverCap
- GetProcessScale
- GetSecUnitsLabel
- GetTareWt
- GetUnitsLabel
- GetWtError
- IsGrossWtChanged
- IsNetWtChanged
- IsTareWtChanged
- IsWtStatusChanged
- IsWtUnitsChanged
- MnBdClearEvent
- MnBdClose
- MnBdGetErr
- MnBdGetErrMsg
- MnBdGetErrMsgStr
- MnBdOpen
- MnBdProcess * DEPRECATED - New apps should use StartRepeatMulti *
- MnBdRead
- MnBdRequest
- MnBdSetEvent
- MnBdSetWIM
- MnBdShutdown
- MnBdStartup
- RequestWt * DEPRECATED - New apps should use StartRepeatMulti *
- ResetPrevGrossWt
- ResetPrevNetWt
- ResetPrevTareWt
- ResetPrevWtStatus
- ResetPrevWtUnits
- SetTareCurrent
- SetTareValue
- SetWIM * DEPRECATED - New apps should use MnBdSetWIM *
- StartRepeatMulti
- StartRepeatWt * DEPRECATED - New apps should use StartRepeatMulti *
- StopRepeatMulti
- StopRepeatWt * DEPRECATED - New apps should use StopRepeatMulti *
- ZeroScale
- Development Environment
- Application Signing
- Debugging
- Setup for Software Development
- Version Control
- Device Support
- Device Drivers
- Beeper
- DIO
- Display
- Network
- Serial Ports
- USB Support
- Weighing
- Foundation
- Application Mode Startup
- Shell operations - Linux / Windows command line Reference
- Mainboard Protocol
- Environment Setup
Display
Multiple fonts are supported using the nano-X (microwindows) .fnt format. The Cardinal SmartWeigh Font converter program may be used to convert TrueType ttf fonts to the .fnt format. Proper licensing must be obtained for any copyrighted fonts to be used.
A special button font is provided with characters that are formatted to be used as buttons for “Zero”, “Tare”, “Gross”, “Net”, “Units”, and “Print”.
Fonts
Fonts are stored in the 825 in files with the Linux nano-X (rockbox) format .fnt. The font folder is /mnt/nand/fonts.
The 825 graphics device driver and the lib825 application library provide functions for loading fonts into RAM memory and displaying text using the loaded fonts
ReadFont
The lib825 function “ReadFont” is used to read and load a font file into RAM.
The parameter nFont is a font number which should be in the range: 1 – 29
The parameter pszFilename is the full path and filename of the font such as:
“/mnt/nand/fonts/Font788_11x2.fnt” (Reminder: Linux path and filenames are case sensitive)
int ReadFont(int nFont, const char* pszFilename)
The return value is zero if successful or one if an error occurred.
DisplayStr
The lib825 function “DisplayStr” is used to display a text string using a specified font.
The parameter nFont is a font number of a font previously loaded into RAM using ReadFont
The parameter x is the X coordinate
The parameter y is the Y coordinate
The parameter dsplogic is the display logic which may be DSP_LOGIC_SET, DSP_LOGIC_XOR, DSP_LOGIC_RESET, or DSP_LOGIC_OVERWRITE
#define DSP_LOGIC_SET 0
#define DSP_LOGIC_XOR 1
#define DSP_LOGIC_RESET 2
#define DSP_LOGIC_OVERWRITE 3
void DisplayStr(int nFont, int x, int y, int dsplogic, const char* p)
Font788.exe
The Windows utility program Font788.exe, previously part of the SmartWeigh install is updated to allow converting 788 fonts or TTF fonts to 825 format. (If your PC does not have the appropriate support files to run this program run the “vcredist.exe” program to install them).
Make sure all font copyrights are observed. Obtain proper licensing for any fonts to be used.
A new menu option “Load built-in font…” is provided.
This allows loading the standard built in fonts.
The “File” “Export” option now allows “Export to 825 format...”
The “Font” menu has an additional feature “Information” which allows detailed viewing and some limited editing of fonts.
Font characters may be modified by clicking the squares representing each pixel. If a pixel which is on is clicked it will be turned off. If a pixel which is off is clicked it will be turned on.
Remote Control using custom fonts
To use apps using custom fonts with remote control the DspApplet.class should be at least version 1.09
The version will show at the bottom of the applet.
A fonts link should be created in the html folder:
This allows the applet to access the fonts in /mnt/nand/fonts from the default html location.